Run input dice disappear animation
This commit is contained in:
parent
3f2281a155
commit
288cd288e4
@ -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")
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user