refactored lobby logic; streamlined commands and added PeerMessages to client for more cohesive socket messaging
This commit is contained in:
+4
-6
@@ -69,12 +69,6 @@ func _set_current_round(round: int) -> void:
|
||||
_current_round = round
|
||||
round_label.text = str(_current_round)
|
||||
|
||||
func _on_web_client_tcp_client_joined_lobby(client_name: String, connected_client_names: Array[String]) -> void:
|
||||
_update_player_count(connected_client_names.size())
|
||||
|
||||
func _on_web_client_tcp_client_left_lobby(client_name: String, connected_client_names: Array[String]) -> void:
|
||||
_update_player_count(connected_client_names.size())
|
||||
|
||||
func _on_player_hand_card_selected(card_id: int) -> void:
|
||||
play_card_button.disabled = card_id == -1
|
||||
|
||||
@@ -106,3 +100,7 @@ func _on_web_client_tcp_received_win() -> void:
|
||||
|
||||
func _on_web_client_tcp_request_next_play() -> void:
|
||||
_start_next_play()
|
||||
|
||||
|
||||
func _on_web_client_connected_clients_changed(connected_client_names: Array[String]) -> void:
|
||||
_update_player_count(connected_client_names.size())
|
||||
|
||||
Reference in New Issue
Block a user