12 lines
376 B
GDScript
12 lines
376 B
GDScript
extends WeaponState
|
|
|
|
func _enter() -> void:
|
|
machine.play("intro")
|
|
machine.animation_player.animation_finished.connect(on_animation_finished)
|
|
|
|
func _exit() -> void:
|
|
machine.animation_player.animation_finished.disconnect(on_animation_finished)
|
|
|
|
func on_animation_finished(animation: StringName):
|
|
if animation == machine.animation_prefix + "intro":
|
|
transition.emit("Idle")
|