Added speed scale for the player walking animation
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user