summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua
new file mode 100644
index 0000000..ccf4d3b
--- /dev/null
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/keypressed/default.lua
@@ -0,0 +1,29 @@
+main.keypressed = function(key, scancode, isrepeat)
+ isrepeat = true
+
+ if scancode == button.quit then
+ love.event.quit()
+ end
+
+ if scancode == button.a then
+ character.bola.actionA = true
+ character.bola.actionDown = false
+ character.bola.actionUp = false
+ end
+
+ if scancode == button.left then
+ character.bola.actionLeft = true
+ end
+
+ if scancode == button.right then
+ character.bola.actionRight = true
+ end
+
+ if scancode == button.up and character.bola.jump.isJumping == false then
+ character.bola.actionUp = true
+ end
+
+ if scancode == button.down and character.bola.jump.isJumping == false then
+ character.bola.actionDown = true
+ end
+end