This commit is contained in:
2026-03-14 12:58:55 -05:00
parent 6738e8d217
commit 1c95315496
22 changed files with 313 additions and 45 deletions

View File

@@ -2,6 +2,7 @@ extends Node2D
signal DrawingBowAnimationFinished
signal FiringArrowAnimationFinished
signal AnimationFinished(animation_name: String)
@export var state_machine: PlayerStateMachine
@export var direction_component: FacingDirectionComponent
@@ -41,6 +42,14 @@ func OnAnimationFinished() -> void:
DrawingBowAnimationFinished.emit()
elif current_animation.begins_with("firing-arrow-"):
FiringArrowAnimationFinished.emit()
AnimationFinished.emit(current_animation)
func PlaySpecifiedAnimation(animation_name: String) -> void:
current_animation = animation_name
for part in all_parts:
part.animation = animation_name
part.play()
# Called when the node enters the scene tree for the first time.