host client can now start round and send out shuffled cards, server can spread them to all connected clients

This commit is contained in:
2025-07-07 22:40:46 +02:00
parent 4ac3fbd962
commit 3122df893a
5 changed files with 76 additions and 14 deletions
+11 -3
View File
@@ -2,14 +2,22 @@ class_name GameClient
extends Node
@export var web_client: WebClientTCP
@export var start_game_button: Button
var is_host: bool = false
var _is_host: bool = false
func _set_host(is_host: bool) -> void:
_is_host = is_host
if is_host:
start_game_button.show()
else:
start_game_button.hide()
func _on_start_game_button_pressed() -> void:
web_client.start_game()
func _on_create_lobby_button_pressed() -> void:
is_host = true
_set_host(true)
func _on_join_lobby_button_pressed() -> void:
is_host = false
_set_host(false)