diff options
Diffstat (limited to 'test0/main.lua')
-rw-r--r-- | test0/main.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test0/main.lua b/test0/main.lua index cb1fbfd..461137d 100644 --- a/test0/main.lua +++ b/test0/main.lua @@ -191,27 +191,27 @@ function love.update(dt) } if love.keyboard.isDown(button.left) then + character.bola.acceleration = character.bola.acceleration + dt if character.bola.position.x >= character.bola.origin.x then - character.bola.acceleration = character.bola.acceleration + dt if character.bola.acceleration < 3 then character.bola.position.x = character.bola.position.x - (character.bola.speed * dt) - character.bola.acceleration else character.bola.position.x = character.bola.position.x - (character.bola.speed * dt) - 3 end - quad = character.bola.spriteWalk[animation.bola.spriteWalk] - character.bola.scale.x = -1 end + quad = character.bola.spriteWalk[animation.bola.spriteWalk] + character.bola.scale.x = -1 elseif love.keyboard.isDown(button.right) then + character.bola.acceleration = character.bola.acceleration + dt if character.bola.position.x <= windowProfile.mode.width - character.bola.origin.x then - character.bola.acceleration = character.bola.acceleration + dt if character.bola.acceleration < 3 then character.bola.position.x = character.bola.position.x + (character.bola.speed * dt) + character.bola.acceleration else character.bola.position.x = character.bola.position.x + (character.bola.speed * dt) + 3 end - quad = character.bola.spriteWalk[animation.bola.spriteWalk] - character.bola.scale.x = 1 end + quad = character.bola.spriteWalk[animation.bola.spriteWalk] + character.bola.scale.x = 1 elseif love.keyboard.isDown(button.down) then character.bola.acceleration = 0 transform.bola.origin.y = character.bola.origin.y - character.bola.origin.y |