Some tweaks in the falling states

This commit is contained in:
2026-02-06 01:40:53 +03:00
parent c3522f5417
commit 230f39cf54
6 changed files with 48 additions and 9 deletions
@@ -1,5 +1,17 @@
extends CultistFallState
@export var fall_state: CultistState
func enter() -> void:
cultist.sprite.play(CultistSprite.ANIMATION_FALL_RIGHT)
func physics_process(delta: float) -> void:
cultist.velocity += cultist.get_gravity() * delta
cultist.move_and_slide()
if cultist.is_on_floor():
switch_state.emit(look_around_state)
elif is_zero_approx(cultist.velocity.x):
switch_state.emit(fall_state)