feat: Implement Nakama serialization, Realtime API, and a comprehensive lobby system with UI and player management.
This commit is contained in:
@@ -166,6 +166,9 @@ func _ready():
|
||||
NakamaManager.connected_to_nakama.connect(_on_connected_to_nakama)
|
||||
NakamaManager.connection_failed.connect(_on_connection_failed)
|
||||
|
||||
# Connect UserProfileManager signals
|
||||
UserProfileManager.profile_updated.connect(_on_profile_updated)
|
||||
|
||||
# Show main menu initially
|
||||
_show_panel("main_menu")
|
||||
|
||||
@@ -487,6 +490,17 @@ func _on_connection_failed(error_message: String) -> void:
|
||||
connection_status.text = "Connection failed: %s" % error_message
|
||||
_show_panel("main_menu")
|
||||
|
||||
func _on_profile_updated() -> void:
|
||||
"""Handle profile updates (name/avatar change)."""
|
||||
var new_name = UserProfileManager.get_display_name()
|
||||
|
||||
# Update input if visible
|
||||
if player_name_input:
|
||||
player_name_input.text = new_name
|
||||
|
||||
# Sync to LobbyManager if we are in a room or just locally
|
||||
LobbyManager.set_player_name(new_name)
|
||||
|
||||
# =============================================================================
|
||||
# Player Slot Updates
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user