played cards get removed from hands and (wrongly) added to the stack
This commit is contained in:
+3
-1
@@ -3,13 +3,15 @@ extends Node3D
|
||||
|
||||
var _card_height: float = 0.06
|
||||
|
||||
@export var playing_card_scene: PackedScene
|
||||
|
||||
func add_card(card: PlayingCard) -> void:
|
||||
var height = self.get_child_count() * _card_height
|
||||
self.add_child(card)
|
||||
card.translate(Vector3(0, height, 0))
|
||||
|
||||
func add_card_by_id(card_id: int) -> void:
|
||||
var playing_card: PlayingCard = PlayingCard.new()
|
||||
var playing_card: PlayingCard = playing_card_scene.instantiate()
|
||||
playing_card.setup_card_details(card_id)
|
||||
add_card(playing_card)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user