* Replace direct client/server networking references with GameClient/GameServer scenes * Refactor message bus to support local emission and argument expansion * Move lobby connection lifecycle handling to message bus events * Remove multiplayer connection wait helpers and direct lobby client coupling * Rename Server to ServerNetworking and update lobby client references * Update scene resources and export configuration
36 lines
676 B
GDScript
36 lines
676 B
GDScript
class_name LobbyClient extends ClientNetworking
|
|
|
|
|
|
var lobby_fully_connected: bool = false
|
|
|
|
|
|
func _ready() -> void:
|
|
pass
|
|
|
|
func _process(_delta: float) -> void:
|
|
pass
|
|
|
|
func _do_wait_for_connection() -> void:
|
|
_wait_for_connection()
|
|
|
|
while not lobby_fully_connected:
|
|
await get_tree().process_frame
|
|
|
|
func _do_wait_close_connection():
|
|
_wait_close_connection()
|
|
|
|
lobby_fully_connected = false
|
|
|
|
|
|
func client_connected_to_server() -> void:
|
|
push_warning("Connected to server!")
|
|
|
|
|
|
func client_disconnected_from_server() -> void:
|
|
push_warning("Disconnected from, server...")
|
|
|
|
func client_connection_failed_to_server() -> void:
|
|
push_warning("Connection failed!")
|
|
|
|
unset_client()
|