Added cultist jump state
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user