feat: Introduce core game managers and main scene, implementing player UI for board, actions, and power-ups.
This commit is contained in:
@@ -27,6 +27,7 @@ var playerboard_ui
|
||||
var action_menu_instance
|
||||
var powerup_inventory_ui
|
||||
var timer_label: Label
|
||||
var playerboard_label: Label # Shows (xN) goal completions
|
||||
|
||||
var local_player_character
|
||||
var _previous_playerboard_state: Array = []
|
||||
@@ -390,9 +391,32 @@ func setup_timer_labels(main_node):
|
||||
if t_label:
|
||||
timer_label = t_label # Store reference
|
||||
t_label.add_theme_color_override("font_color", Color(1.0, 0.85, 0.2))
|
||||
print("[UIManager] SUCCESS: Found and stored TimerLabel reference.")
|
||||
else:
|
||||
print("[UIManager] ERROR: GoalsTimer found but TimerLabel NOT found at node/TimerLabel")
|
||||
var suffix_label = goals_timer.get_node_or_null("SuffixLabel")
|
||||
if suffix_label:
|
||||
suffix_label.add_theme_color_override("font_color", Color(0.7, 0.7, 0.7))
|
||||
|
||||
func setup_playerboard_label(main_node):
|
||||
var lbl = main_node.get_node_or_null("PlayerBoardLabel")
|
||||
if lbl:
|
||||
playerboard_label = lbl
|
||||
playerboard_label.text = "" # Hidden initially
|
||||
print("[UIManager] Found PlayerBoardLabel")
|
||||
else:
|
||||
print("[UIManager] PlayerBoardLabel not found")
|
||||
|
||||
func update_goal_count_label(count: int):
|
||||
if playerboard_label:
|
||||
if count > 0:
|
||||
playerboard_label.text = "x%d" % count
|
||||
|
||||
# Pop effect
|
||||
var tween = playerboard_label.create_tween()
|
||||
playerboard_label.scale = Vector2(1.5, 1.5)
|
||||
tween.tween_property(playerboard_label, "scale", Vector2(1.0, 1.0), 0.3).set_trans(Tween.TRANS_BOUNCE)
|
||||
else:
|
||||
playerboard_label.text = ""
|
||||
|
||||
# Method to update leaderboard with all players in match
|
||||
func initialize_leaderboard_with_players(players: Array):
|
||||
|
||||
Reference in New Issue
Block a user