nc5432 69008d0046 More animations
- Implemented firebolt animation
- Started on icy wind animation
- Added animation to health bars
- Improved the animation system more
- Cleaned up some code
2024-05-14 21:40:18 -04:00

23 lines
542 B
GDScript

extends AnimationBase
@export var explodeDur: float = 0.2
@onready var ballofayr: AnimatedSprite2D = $AnimatedSprite2D
@onready var particles: GPUParticles2D = $GPUParticles2D
var exploding: bool = false
var timer: float = 0
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
if (exploding):
timer += delta
if timer > explodeDur:
self.queue_free()
func die() -> void:
particles.position = ballofayr.position
ballofayr.hide()
particles.emitting = true
exploding = true
timer = 0