update feature & bugfix
This commit is contained in:
@@ -58,11 +58,22 @@ func _add_bar():
|
||||
# Type 1 = POWERUP message for special styling
|
||||
player.rpc("display_message", "Power-up bar filled!", 1)
|
||||
print("[PowerUp] Player %s gained 1 bar! Total: %d/%d points" % [player.name, current_points, MAX_POINTS])
|
||||
|
||||
if player.is_multiplayer_authority():
|
||||
player.get_node("PowerUpManager").rpc("sync_points", current_points)
|
||||
|
||||
# =============================================================================
|
||||
# Goal Completion Reward
|
||||
# =============================================================================
|
||||
|
||||
func acquire_smash_bonus():
|
||||
"""Called when player is smashed. Grants 1 bar up to a max of 2 bars."""
|
||||
if get_bars() < 2:
|
||||
_add_bar()
|
||||
print("[PowerUp] Player %s gained smash bonus bar! Total: %d/%d" % [player.name, current_points, MAX_POINTS])
|
||||
else:
|
||||
print("[PowerUp] Player %s smash bonus capped (already has >= 2 bars)" % player.name)
|
||||
|
||||
func add_goal_completion_reward():
|
||||
"""Called when player completes a goal pattern. Awards 1 bar."""
|
||||
_add_bar()
|
||||
|
||||
Reference in New Issue
Block a user