die.gd 251 B

12345678910
  1. extends "res://state_machine/state.gd"
  2. # Initialize the state. E.g. change the animation.
  3. func enter():
  4. owner.set_dead(true)
  5. owner.get_node(^"AnimationPlayer").play("die")
  6. func _on_animation_finished(_anim_name):
  7. emit_signal("finished", "dead")