diff --git a/source/scripts/player.lua b/source/scripts/player.lua index 9813966..dcd65f9 100644 --- a/source/scripts/player.lua +++ b/source/scripts/player.lua @@ -34,7 +34,7 @@ function Player:init(x, y) -- Physics properties self.fallSpeed = 0.05 - self.xVelocity = 0 + self.xVelocity = -0.5 self.yVelocity = self.fallSpeed self.maxXSpeed = 2 self.maxYSpeed = 5 @@ -67,6 +67,7 @@ function Player:handleInput() if not playdate.buttonIsPressed(playdate.kButtonLeft) and not playdate.buttonIsPressed(playdate.kButtonRight) then self.xVelocity = self.xVelocity * self.friction Player.moveRight = false + self.animation:setState("down") end local isChangingDirection = false @@ -101,7 +102,6 @@ function Player:handleInput() self.yInertia = self.yInertia - (acceleratedChange * 0.007) else self.yInertia = self.yInertia * self.friction - self.animation:setState("down") end end