feat: Implement the initial main game scene, including GridMap, comprehensive UI, and mobile touch controls.
This commit is contained in:
@@ -28,6 +28,7 @@ var action_menu_instance
|
||||
var powerup_inventory_ui
|
||||
var timer_label: Label
|
||||
var playerboard_label: Label # Shows (xN) goal completions
|
||||
var player_name_label: Label # Shows player name on main UI
|
||||
|
||||
var local_player_character
|
||||
var _previous_playerboard_state: Array = []
|
||||
@@ -58,6 +59,9 @@ func initialize(player_node):
|
||||
randomize_button = button_container.get_node("RandomizeButton") # renamed main_node to player_node which is Main
|
||||
arrange_button = player_node.get_node("ActionMenu/ActionButtonContainer/ArrangeButton")
|
||||
playerboard_ui = player_node.get_node("PlayerboardUI")
|
||||
|
||||
# Connect PlayerName label (Level/XP/Name UI)
|
||||
player_name_label = player_node.get_node_or_null("PlayerName")
|
||||
|
||||
# ... (skipping unchanged functions) ...
|
||||
|
||||
@@ -70,6 +74,11 @@ func set_local_player(player):
|
||||
# Connect to powerup signals with deferred call (manager needs time to initialize)
|
||||
_connect_powerup_manager_deferred(player)
|
||||
|
||||
# Update Player Name Label
|
||||
if player_name_label:
|
||||
player_name_label.text = player.display_name
|
||||
print("[UIManager] Updated PlayerName label to: ", player.display_name)
|
||||
|
||||
func setup_action_buttons(action_state_callback):
|
||||
move_button.pressed.connect(func(): action_state_callback.call(ActionState.MOVING))
|
||||
grab_button.pressed.connect(func(): action_state_callback.call(ActionState.GRABBING))
|
||||
|
||||
Reference in New Issue
Block a user