client: added player hand and animation for added cards
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user