request_bet and request_card are now broadcast for everyone to receive and display an arrow to represent active client's turn
This commit is contained in:
@@ -32,6 +32,8 @@ var _bets: Dictionary[String, Array] # Array[BetResult]
|
||||
var _plays: Array[Play]
|
||||
var _trump_id: int = -1
|
||||
|
||||
var _current_turn_client_id: String = ""
|
||||
|
||||
func _on_web_client_tcp_client_order_received(playing_order: Array[ClientData]) -> void:
|
||||
var marker_positions: Array[Marker3D]
|
||||
var client_ids: Array[String] = []
|
||||
@@ -146,3 +148,12 @@ func _on_web_client_tcp_received_end_game_request() -> void:
|
||||
|
||||
func _on_web_client_connected_to_lobby(lobby_id: String, client_id: String) -> void:
|
||||
_own_client_id = client_id
|
||||
|
||||
|
||||
func _on_web_client_notify_player_turn(client_id: String, is_self: bool) -> void:
|
||||
if _current_turn_client_id:
|
||||
hand_associations[_current_turn_client_id].set_turn(false, is_self)
|
||||
|
||||
_current_turn_client_id = client_id
|
||||
if _current_turn_client_id:
|
||||
hand_associations[_current_turn_client_id].set_turn(true, is_self)
|
||||
|
||||
Reference in New Issue
Block a user