diff options
author | Jorge Lopez Seijas <jorginho@riseup.net> | 2016-12-01 19:59:55 +0100 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-12-01 19:53:38 -0300 |
commit | 66076f572c2289d7522f56f864013e9a9d6d8d8d (patch) | |
tree | bbc9785567ad08301262bb9b7d4ae7315e05206f | |
parent | ccd7e759b85f74a5a53b6229395255c659e52760 (diff) |
Solved jetpack effect
3 files changed, 11 insertions, 3 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua index 409028d..a0eafdb 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/main.lua @@ -74,6 +74,14 @@ function love.keyreleased(key, scancode) if scancode == button.b then character.bola.actionB = false end + + if scancode == button.a then + character.bola.actionA = false + + if character.bola.jump.velocity ~= 0 then + character.bola.jump.limitButtonJump = true + end + end end function love.update(dt) diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/gravity.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/gravity.lua index 9976d48..af8388a 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/gravity.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/gravity.lua @@ -14,7 +14,9 @@ function gravity(dt) character.bola.jump.velocity = 0 character.bola.position.y = character.bola.jump.ground character.bola.jump.higher = character.bola.jump.higherMax - character.bola.jump.limitButtonJump = true + + character.bola.jump.limitButtonJump = false + character.bola.actionA = false end end 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 c87b51b..3b807a6 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 @@ -3,8 +3,6 @@ local motionModule = {} function motionModule.motion(dt) if character.bola.jump.higher > 0 and character.bola.actionA == true then jump(dt) - else - character.bola.jump.limitButtonJump = false end if character.bola.actionLeft == true then |