18 lines
369 B
GDScript3
Raw Normal View History

extends "res://Scripts/animationBase.gd"
@onready var texture: AnimatedSprite2D = $AnimatedSprite2D
var exploding: bool = false
func animFinished(_s: String):
if (!exploding && index == finalIndex):
animationFinished.emit(spell)
die()
elif (exploding):
queue_free()
func die() -> void:
exploding = true
animationPlayer.stop()
animationPlayer.play("die")