2024-05-07 21:43:09 -04:00
|
|
|
extends "res://Scripts/animationBase.gd"
|
|
|
|
|
2024-05-14 21:40:18 -04:00
|
|
|
@onready var texture: AnimatedSprite2D = $AnimatedSprite2D
|
2024-05-07 21:43:09 -04:00
|
|
|
|
2024-05-14 21:40:18 -04:00
|
|
|
var exploding: bool = false
|
2024-05-07 21:43:09 -04:00
|
|
|
|
2024-05-14 21:40:18 -04:00
|
|
|
func animFinished(_s: String):
|
|
|
|
if (!exploding && index == finalIndex):
|
|
|
|
animationFinished.emit(spell)
|
|
|
|
die()
|
|
|
|
elif (exploding):
|
|
|
|
queue_free()
|
2024-05-07 21:43:09 -04:00
|
|
|
|
2024-05-14 21:40:18 -04:00
|
|
|
func die() -> void:
|
|
|
|
exploding = true
|
|
|
|
animationPlayer.stop()
|
|
|
|
animationPlayer.play("die")
|