Compare commits

..

4 Commits

3 changed files with 14 additions and 1 deletions

View File

@ -60,6 +60,9 @@ func update_cardview(new_card = null):
for i in input_dice_views:
i.bold = true
#TODO: same dice UI support
#TODO: hover UI support maybe
# add an input_dice_view to the array (for easy management)
# and to the autogrid
@ -71,6 +74,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")

View File

@ -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")

View File

@ -33,7 +33,7 @@ font_data = ExtResource( 1 )
[sub_resource type="Animation" id=8]
resource_name = "Disappear"
length = 0.5
length = 0.8
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:rect_scale")