diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-11-26 13:33:20 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-11-26 13:33:20 -0300 |
commit | 1a7190dcc11c5f48403bf2a9154e6242a482f59c (patch) | |
tree | b2ddd1645f5f4d9a9e7c14badd1af7491c909b46 /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua | |
parent | ca796c7c32989274e0e30bcb8e2648936ec23a3b (diff) |
Minor fix in quad.bola
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua')
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua index 89bc2e9..c4b9b4c 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua @@ -2,7 +2,7 @@ local motionModule = {} function motionModule.motion(dt) if love.keyboard.isScancodeDown(button.a, button.left, button.right) then - if love.keyboard.isScancodeDown(button.a) then + if love.keyboard.isScancodeDown(button.a) then jump(dt) end if love.keyboard.isScancodeDown(button.left) then @@ -20,18 +20,14 @@ function jump(dt) character.bola.jump.velocity = character.bola.jump.height end - quad = { - bola = character.bola.jump[math.floor(character.bola.jump.start)] - } +-- quad.bola = character.bola.jump[math.floor(character.bola.jump.start)] end function walkLeft(dt) if character.bola.position.x >= character.bola.origin.x then character.bola.position.x = character.bola.position.x - (character.bola.velocity * dt) end - quad = { - bola = character.bola.walk[math.floor(character.bola.walk.start)] - } + quad.bola = character.bola.walk[math.floor(character.bola.walk.start)] character.bola.scale.x = -1 end @@ -39,16 +35,12 @@ function walkRight(dt) if character.bola.position.x <= windowProfile.mode.width - character.bola.origin.x then character.bola.position.x = character.bola.position.x + (character.bola.velocity * dt) end - quad = { - bola = character.bola.walk[math.floor(character.bola.walk.start)] - } + quad.bola = character.bola.walk[math.floor(character.bola.walk.start)] character.bola.scale.x = 1 end function stand(dt) - quad = { - bola = character.bola.stand[math.floor(character.bola.stand.start)] - } + quad.bola = character.bola.stand[math.floor(character.bola.stand.start)] end return motionModule |