diff options
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game')
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua | 4 | ||||
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua | 18 |
2 files changed, 9 insertions, 13 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua index fcab58a..8d955d3 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua @@ -40,6 +40,10 @@ function animationModule.animation(dt) character.bola.stand.start = game.animation(character.bola.stand.start, frames.bola.stand, -1, false) character.bola.walk.start = game.animation(character.bola.walk.start, frames.bola.walk, -1, false) character.bola.jump.start = game.animation(character.bola.jump.start, frames.bola.jump, -1, false) + + quad = { + bola = character.bola.stand[math.floor(character.bola.stand.start)] + } end return animationModule 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 |