feat: Introduce core game managers and main scene, implementing player UI for board, actions, and power-ups.

This commit is contained in:
Yogi Wiguna
2026-02-05 16:12:34 +08:00
parent fe494b50ef
commit e933773688
6 changed files with 111 additions and 3 deletions
+7
View File
@@ -28,6 +28,7 @@ func _ready():
ui_manager.setup_action_buttons(_set_action_state_callback)
ui_manager.setup_playerboard_ui()
ui_manager.setup_timer_labels(self)
ui_manager.setup_playerboard_label(self) # NEW
ui_manager.setup_leaderboard_ui(self)
ui_manager.setup_powerup_bar_ui(self)
# GlobalMatchTimer is now static in main.tscn - no setup needed
@@ -43,6 +44,11 @@ func _ready():
if multiplayer.is_server():
randomize_game_grid()
_setup_tile_respawn_timer()
func _on_goal_count_updated(peer_id: int, count: int):
# Only update for local player
if peer_id == multiplayer.get_unique_id():
ui_manager.update_goal_count_label(count)
func _setup_tile_respawn_timer():
# Configure respawn rate based on Scarcity Mode from Lobby
@@ -127,6 +133,7 @@ func _init_managers():
# Connect signals for UI updates
goals_cycle_manager.timer_updated.connect(_on_timer_updated)
goals_cycle_manager.score_updated.connect(_on_score_updated)
goals_cycle_manager.goal_count_updated.connect(_on_goal_count_updated) # NEW
goals_cycle_manager.leaderboard_updated.connect(_on_leaderboard_updated)
goals_cycle_manager.global_timer_updated.connect(_on_global_timer_updated)
goals_cycle_manager.match_ended.connect(_on_match_ended)