Align patterns better around what UI components are. Move script related controllers to scripts folder

This commit is contained in:
2026-08-15 14:33:53 -05:00
parent 27411ea5fa
commit 2b196455b2
57 changed files with 128 additions and 60 deletions

View File

@@ -0,0 +1,31 @@
class_name GameServer extends ServerNetworking
func _ready() -> void:
setup_signals()
func setup_signals() -> void:
pass
func server_client_connected(id: int) -> void:
push_warning("Client Connected... ID: ", id)
if not Globals.game_data.client1:
Globals.game_data.client1 = id
elif not Globals.game_data.client2:
Globals.game_data.client2 = id
if Globals.game_data.client1 and Globals.game_data.client2:
Globals.multiplayer_data.init_match()
# TODO: Add watch match feature...
func server_client_disconnected(id: int) -> void:
push_warning("Client Disconnected... ID: ", id)
MessageBus.emit_propagation_clients_only.rpc("game_peer_disconnected", null)
await get_tree().create_timer(5.0).timeout
# NOTE: Quits game server instance.
get_tree().quit()