Files
Billiards/scenes/screens/lobby_screen/lobby_client.gd

36 lines
676 B
GDScript3
Raw Permalink Normal View History

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()