2023-02-01 10:43:50 +01:00
|
|
|
extends AnimatedSprite2D
|
2019-09-16 08:07:41 +02:00
|
|
|
|
|
|
|
func _ready():
|
|
|
|
play("spawn")
|
2023-02-01 10:43:50 +01:00
|
|
|
connect("animation_finished",Callable(self,"on_animation_finished"))
|
2019-09-16 08:07:41 +02:00
|
|
|
|
|
|
|
|
|
|
|
func on_animation_finished():
|
|
|
|
if(animation == "spawn"):
|
|
|
|
play("destroy")
|
|
|
|
else:
|
|
|
|
get_parent().queue_free()
|