summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-26 13:33:20 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-26 15:33:52 -0300
commite65c1a7a260710c4ba62f30184e5b5ddfe195b46 (patch)
treeb2ddd1645f5f4d9a9e7c14badd1af7491c909b46
parentaf1a4f09a7f39e6fd48911650ba9fef45f98bde7 (diff)
Minor fix in quad.bola
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua4
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion/motion.lua18
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