feat: Implement the initial main game scene, including GridMap, comprehensive UI, and mobile touch controls.

This commit is contained in:
Yogi Wiguna
2026-02-10 11:26:28 +08:00
parent 65d18d8d96
commit 2c1f6746d4
4 changed files with 43 additions and 9 deletions
+9
View File
@@ -680,6 +680,15 @@ func add_player_character(peer_id: int, is_bot: bool = false):
GameStateManager.add_player(peer_id)
# Try to set name from LobbyManager data if available
var lobby_players = LobbyManager.get_players()
for p_data in lobby_players:
if p_data.get("id") == peer_id:
var p_name = p_data.get("name", "Player")
player_character.display_name = p_name
print("[Main] Set player %d name to %s from Lobby data" % [peer_id, p_name])
break
if peer_id == multiplayer.get_unique_id():
GameStateManager.local_player_character = player_character
ui_manager.set_local_player(player_character)