diff --git a/UI/CardView.gd b/UI/CardView.gd index 82f9cd2..3fb2500 100644 --- a/UI/CardView.gd +++ b/UI/CardView.gd @@ -18,6 +18,7 @@ var card : Card = Card.new() setget update_cardview func _ready(): update_cardview() connect_signals() + card_view_run() func update_cardview(new_card = null): @@ -71,6 +72,11 @@ func add_input_dice_view(): # this is run once the card emits card_removed func card_view_run(): + + # play the disappearing input dice animation + for i in input_dice_views: + yield(i.run_disappear_animation(), "completed") + # play the using animation $AnimationPlayer.play("Fly Off") yield($AnimationPlayer, "animation_finished") diff --git a/UI/InputDiceView.gd b/UI/InputDiceView.gd index 1d63b75..faac5c8 100644 --- a/UI/InputDiceView.gd +++ b/UI/InputDiceView.gd @@ -23,3 +23,8 @@ func set_bold(is_bold : bool = true): $Sprite.texture = load("res://Assets/DiceInput.png") bold = is_bold + + +func run_disappear_animation(): + $AnimationPlayer.play("Disappear") + yield($AnimationPlayer, "animation_finished")