added cardstack to place played cards at the centre of the table

This commit is contained in:
2025-07-16 11:50:33 +02:00
parent cc7afb5477
commit f39c9e46d9
5 changed files with 31 additions and 9 deletions
+4 -4
View File
@@ -5,7 +5,7 @@ var hand_associations: Dictionary[String, PlayerHand]
@export var web_client: WebClientTCP
@export var trump_container: Node3D
@export var card_stack: CardStack
# In gameplay order
#var hand_associations: Dictionary[int, PlayerHandAssociation]
@@ -105,12 +105,12 @@ func _on_web_client_tcp_received_play_winner_request() -> void:
return
func _on_web_client_tcp_trump_received(trump_id: int) -> void:
if trump_container.get_child_count() > 0:
trump_container.remove_child(trump_container.get_child(0))
_trump_id = trump_id
var trump_card: PlayingCard = card_scene.instantiate()
trump_card.setup_card_details(_trump_id)
trump_container.add_child(trump_card)
#trump_container.add_child(trump_card)
card_stack.purge_cards()
card_stack.add_card(trump_card)
func _on_web_client_tcp_new_round_started() -> void:
# prepare a fresh BetResults bunch for the new round! the clients are hungry.