Compare commits
4 Commits
3f2281a155
...
40fb724000
Author | SHA1 | Date | |
---|---|---|---|
40fb724000 | |||
87a5c280d6 | |||
eb29b2ce44 | |||
288cd288e4 |
@ -60,6 +60,9 @@ func update_cardview(new_card = null):
|
|||||||
for i in input_dice_views:
|
for i in input_dice_views:
|
||||||
i.bold = true
|
i.bold = true
|
||||||
|
|
||||||
|
#TODO: same dice UI support
|
||||||
|
#TODO: hover UI support maybe
|
||||||
|
|
||||||
|
|
||||||
# add an input_dice_view to the array (for easy management)
|
# add an input_dice_view to the array (for easy management)
|
||||||
# and to the autogrid
|
# and to the autogrid
|
||||||
@ -71,6 +74,11 @@ func add_input_dice_view():
|
|||||||
|
|
||||||
# this is run once the card emits card_removed
|
# this is run once the card emits card_removed
|
||||||
func card_view_run():
|
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
|
# play the using animation
|
||||||
$AnimationPlayer.play("Fly Off")
|
$AnimationPlayer.play("Fly Off")
|
||||||
yield($AnimationPlayer, "animation_finished")
|
yield($AnimationPlayer, "animation_finished")
|
||||||
|
@ -23,3 +23,8 @@ func set_bold(is_bold : bool = true):
|
|||||||
$Sprite.texture = load("res://Assets/DiceInput.png")
|
$Sprite.texture = load("res://Assets/DiceInput.png")
|
||||||
|
|
||||||
bold = is_bold
|
bold = is_bold
|
||||||
|
|
||||||
|
|
||||||
|
func run_disappear_animation():
|
||||||
|
$AnimationPlayer.play("Disappear")
|
||||||
|
yield($AnimationPlayer, "animation_finished")
|
||||||
|
@ -33,7 +33,7 @@ font_data = ExtResource( 1 )
|
|||||||
|
|
||||||
[sub_resource type="Animation" id=8]
|
[sub_resource type="Animation" id=8]
|
||||||
resource_name = "Disappear"
|
resource_name = "Disappear"
|
||||||
length = 0.5
|
length = 0.8
|
||||||
step = 0.01
|
step = 0.01
|
||||||
tracks/0/type = "value"
|
tracks/0/type = "value"
|
||||||
tracks/0/path = NodePath("Sprite:rect_scale")
|
tracks/0/path = NodePath("Sprite:rect_scale")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user