Added wall states

This commit is contained in:
2026-06-28 19:59:18 +03:00
parent 204546b93a
commit 84ab412658
8 changed files with 136 additions and 6 deletions
@@ -13,6 +13,7 @@ enum Direction {
@export var another_direction : AbstractPlayerState
@export var run : AbstractPlayerState
@export var run_another_direction : AbstractPlayerState
@export var wall : AbstractPlayerState
func enter() -> void:
@@ -47,6 +48,8 @@ func physics_process(_delta: float) -> void:
switch_state.emit(run)
else:
switch_state.emit(run_another_direction)
elif player.is_on_wall():
switch_state.emit(wall)
else:
if not is_zero_approx(player.velocity.x):
match direction: