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