client: added player hand and animation for added cards

This commit is contained in:
2025-07-08 15:58:46 +02:00
parent 4fec323639
commit a7ea8510f7
9 changed files with 137 additions and 14 deletions
+8
View File
@@ -1,6 +1,8 @@
extends Node
@export var full_deck: Dictionary[int, Card]
@export var card_textures: Dictionary[int, Texture]
@export var card_fallback_texture: Texture
func get_shuffled_cards(client_ids: Array[String], cards_to_pick: int) -> Dictionary: # Dictionary[String, Array[int]]
var dict: Dictionary = {}
@@ -21,3 +23,9 @@ func get_shuffled_cards(client_ids: Array[String], cards_to_pick: int) -> Dictio
dict["trump"] = deck[card_index]
return dict
func get_card_texture(card_id: int) -> Texture:
if card_textures.has(card_id):
return card_textures[card_id]
return card_fallback_texture