12 lines
416 B
GDScript
12 lines
416 B
GDScript
extends WeaponState
|
|
|
|
func enter() -> void:
|
|
machine.animation_player.play(machine.animation_prefix+"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")
|