diff options
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua')
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua index 0b6ad46..c87b51b 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua @@ -1,20 +1,25 @@ local motionModule = {} function motionModule.motion(dt) - if character.bola.jump.higher > 0 and love.keyboard.isScancodeDown(button.a) then + if character.bola.jump.higher > 0 and character.bola.actionA == true then jump(dt) else character.bola.jump.limitButtonJump = false end - if love.keyboard.isScancodeDown(button.left) then + if character.bola.actionLeft == true then walkLeft(dt) - elseif love.keyboard.isScancodeDown(button.right) then + end + + if character.bola.actionRight == true then walkRight(dt) end - if love.keyboard.isScancodeDown(button.up) then + + if character.bola.actionUp == true then walkUp(dt) - elseif love.keyboard.isScancodeDown(button.down) then + end + + if character.bola.actionDown == true then walkDown(dt) end end |