Updated cultist jump state

This commit is contained in:
2026-02-13 01:21:11 +03:00
parent ebc0133a82
commit aa7b392edc
4 changed files with 8 additions and 22 deletions
@@ -3,7 +3,7 @@ class_name CultistJumpState
extends CultistState
@export var fall_state: CultistState
@export var chase_state: CultistState
var _direction := 0
@@ -14,8 +14,8 @@ func enter() -> void:
func physics_process(delta: float) -> void:
if cultist.velocity.y > 0:
switch_state.emit(fall_state)
if cultist.is_on_floor():
switch_state.emit(chase_state)
else:
cultist.velocity += cultist.get_gravity() * cultist.get_gravity_factor() * delta
cultist.update_x_velocity(_direction, cultist.MAX_WALK_SPEED, delta)