summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 18:39:56 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-12-03 18:39:56 -0300
commitef5bce4721d1307200b1335565303a7832f77535 (patch)
treef1840a3e31dcf4cda066d5f377edb4ff2af31622 /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased
parent1a9e17acb3a65a98305d19363f6b4e7185356c74 (diff)
Keep the code more KISS - part 2
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua
new file mode 100644
index 0000000..fa3bf6a
--- /dev/null
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keyreleased/default.lua
@@ -0,0 +1,33 @@
+main.keyreleased = function(key, scancode)
+ if scancode == button.a then
+ character.bola.actionA = false
+ end
+
+ if scancode == button.left then
+ character.bola.actionLeft = false
+ end
+
+ if scancode == button.right then
+ character.bola.actionRight = false
+ end
+
+ if scancode == button.up then
+ character.bola.actionUp = false
+ end
+
+ if scancode == button.down then
+ character.bola.actionDown = false
+ end
+
+ 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