feat: Introduce core game managers and main scene, implementing player UI for board, actions, and power-ups.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -961,6 +961,18 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("9_6gcb6")
|
||||
|
||||
[node name="PlayerBoardLabel" type="Label" parent="." unique_id=341385584]
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = 217.0
|
||||
offset_top = -20.0
|
||||
offset_right = 257.0
|
||||
offset_bottom = 3.0
|
||||
grow_vertical = 2
|
||||
theme_override_font_sizes/font_size = 32
|
||||
text = "X0"
|
||||
|
||||
[node name="PowerUpBar" type="PanelContainer" parent="." unique_id=1775378146]
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
@@ -9415,6 +9427,7 @@ offset_bottom = 24.0
|
||||
texture = ExtResource("10_my1qp")
|
||||
|
||||
[node name="MessageBar" type="PanelContainer" parent="." unique_id=142729129]
|
||||
visible = false
|
||||
anchors_preset = 2
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
|
||||
Reference in New Issue
Block a user