pandemonium_demo_projects/2d/finite_state_machine/player/states/die.gd

11 lines
250 B
GDScript

extends "res://state_machine/state.gd"
# Initialize the state. E.g. change the animation.
func enter():
owner.set_dead(true)
owner.get_node("AnimationPlayer").play("die")
func _on_animation_finished(_anim_name):
emit_signal("finished", "dead")