Added speed scale for the player walking animation

This commit is contained in:
2026-02-03 00:11:48 +03:00
parent 67c5f8e4d5
commit c0de81481e
11 changed files with 21 additions and 0 deletions
@@ -2,4 +2,10 @@ extends PlayerState
func enter() -> void:
player.sprite.speed_scale = 1
player.sprite.play(PlayerSprite.ANIMATION_WALK_LEFT)
func process(delta: float) -> void:
player.sprite.speed_scale = -player.velocity.x / player.max_speed
super.process(delta)