Rework player state system to use an event subscription system to avoid directly calling methods on individual state and having to worry about validity

This commit is contained in:
2026-04-01 11:11:02 -05:00
parent 7cd34cb07e
commit eabfeab91a
35 changed files with 882 additions and 2288 deletions

View File

@@ -0,0 +1,11 @@
extends Node
@export var state_machine: PlayerStateMachine
# Public Methods
func OnMovementQueued(direction_vector: Vector2) -> void:
state_machine.SendEventToCurrentStateIfValid("MovementQueued", direction_vector)
func OnNoMovementQueued() -> void:
state_machine.SendEventToCurrentStateIfValid("NoMovementQueued")