player names are now displayed above player hands

This commit is contained in:
2025-07-16 09:45:44 +02:00
parent 92ea8807c8
commit 4dcbc6787b
3 changed files with 8 additions and 3 deletions
+2 -1
View File
@@ -31,7 +31,7 @@ var _own_client_id: String
var _plays: Array[Play]
var _trump_id: int = -1
func _on_web_client_tcp_client_order_received(client_ids: Array[String]) -> void:
func _on_web_client_tcp_client_order_received(client_ids: Array[String], client_ids_playing_order: Array[String], client_names: Array[String]) -> void:
var marker_positions: Array[Marker3D]
match client_ids.size():
3:
@@ -69,6 +69,7 @@ func _on_web_client_tcp_client_order_received(client_ids: Array[String]) -> void
hand = own_player_hand
else:
hand = player_hand_scene.instantiate()
hand.set_player_name(client_names[client_ids_playing_order.find(client_ids[index])])
marker_positions[index - 1].add_child(hand)
hand_associations[client_ids[index]] = hand