feat: Implement core game managers for power-ups, UI, goals, and player actions, and establish initial game scene and player.

This commit is contained in:
2025-12-17 03:51:15 +08:00
parent e41ffcfb67
commit 75eb398649
8 changed files with 216 additions and 56 deletions
+4 -2
View File
@@ -47,7 +47,8 @@ func _add_bar():
emit_signal("bar_filled")
emit_signal("points_changed", current_points, MAX_POINTS)
player.rpc("display_message", "Power-up bar filled!")
# 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])
# =============================================================================
@@ -74,7 +75,8 @@ func get_bars() -> int:
func use_special_effect():
"""Consume 1 bar and trigger a random special effect."""
if not can_use_special():
player.rpc("display_message", "Not enough power-up!")
# Type 3 = WARNING message
player.rpc("display_message", "Not enough power-up!", 3)
return false
# Consume 1 bar