Reorganize file structure of project

This commit is contained in:
2026-03-17 14:44:13 -05:00
parent 86e3198645
commit 5a94483ffe
155 changed files with 365 additions and 162 deletions

View File

@@ -0,0 +1,31 @@
extends BaseState
class_name FiringArrowState
signal PlayerBeganFiringArrow
signal ArrowFired(spawn_position: Vector2, direction: Vector2)
@export var direction_component: FacingDirectionComponent
@export var arrow_spawn_marker: Marker2D
func GetStateEnum() -> PlayerStateMachine.States:
return PlayerStateMachine.States.FIRING_ARROW
func Enter(_extra_parameters: Dictionary) -> void:
PlayerBeganFiringArrow.emit()
var position := arrow_spawn_marker.global_position
var direction := Vector2.ZERO
if direction_component.current_direction == Enums.Directions.LEFT:
direction = Vector2.LEFT
elif direction_component.current_direction == Enums.Directions.RIGHT:
direction = Vector2.RIGHT
elif direction_component.current_direction == Enums.Directions.UP:
direction = Vector2.UP
elif direction_component.current_direction == Enums.Directions.DOWN:
direction = Vector2.DOWN
ArrowFired.emit(position, direction)
func OnFiringArrowAnimationFinished() -> void:
state_machine.QueueStateChange(PlayerStateMachine.States.IDLE)