Completely refractor the project so the code isn't so terrible #7

Merged
CactiChameleon9 merged 39 commits from card-rework into main 2022-08-24 09:51:59 +01:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit 288cd288e4 - Show all commits

View File

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

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