feat: Add lobby and multiplayer room management with Nakama and ENet LAN support.
This commit is contained in:
+4
-6
@@ -726,12 +726,8 @@ func _on_ready_state_changed(_player_id: int, _is_ready: bool) -> void:
|
||||
|
||||
func _on_all_players_ready() -> void:
|
||||
if LobbyManager.is_host:
|
||||
if LobbyManager.is_lan_mode and LobbyManager.players_in_room.size() == 1:
|
||||
# Auto-start for solo LAN testing
|
||||
LobbyManager.start_game()
|
||||
else:
|
||||
start_game_btn.disabled = false
|
||||
status_label.text = "All ready! Start the match!"
|
||||
start_game_btn.disabled = false
|
||||
status_label.text = "All ready! Start the match!"
|
||||
else:
|
||||
status_label.text = "All ready! Waiting for host..."
|
||||
|
||||
@@ -876,6 +872,8 @@ func _update_player_slots() -> void:
|
||||
if ready_label:
|
||||
ready_label.text = "WAITING..."
|
||||
ready_label.add_theme_color_override("font_color", Color(0.5, 0.5, 0.7))
|
||||
|
||||
_update_status()
|
||||
|
||||
func _update_status() -> void:
|
||||
var players = LobbyManager.get_players()
|
||||
|
||||
Reference in New Issue
Block a user