Added cultist jump state

This commit is contained in:
2026-02-12 21:44:23 +03:00
parent 80d8785a71
commit 0dff01da11
11 changed files with 69 additions and 7 deletions
@@ -4,6 +4,7 @@ extends CultistMoveState
@export var look_around_state: CultistState
@export var jump_state: CultistState
func physics_process(delta: float) -> void:
@@ -14,8 +15,10 @@ func physics_process(delta: float) -> void:
if player != null:
cultist.target_x = player.position.x
if _is_target_reached() or _wall_ray_cast.is_colliding():
if _is_target_reached():
switch_state.emit(look_around_state)
elif _wall_ray_cast.is_colliding():
switch_state.emit(jump_state)
else:
cultist.update_x_velocity(_direction, cultist.MAX_CHASE_SPEED, delta)