massive work towards godot 4
This commit is contained in:
12
scripts/destroy_after_animation.gd
Normal file
12
scripts/destroy_after_animation.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends AnimatedSprite2D
|
||||
|
||||
func _ready():
|
||||
play("spawn")
|
||||
connect("animation_finished",Callable(self,"on_animation_finished"))
|
||||
|
||||
|
||||
func on_animation_finished():
|
||||
if(animation == "spawn"):
|
||||
play("destroy")
|
||||
else:
|
||||
get_parent().queue_free()
|
||||
Reference in New Issue
Block a user