summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-24 14:24:49 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-24 15:42:39 -0300
commitc3d10a8eb153d80df99fc124942644046c3d4ffb (patch)
tree2124399cbbb3073e056d98a7a05b0b4373e0e47b
parentcf98a411c154fcc86da556249f11660c08a4467d (diff)
Add A/B/Select/Start buttons
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/motion.lua10
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/player/1/button.lua18
2 files changed, 18 insertions, 10 deletions
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 ee7cfd5..89b9b2e 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
@@ -1,7 +1,15 @@
local motionModule = {}
function motionModule.motion(dt)
- if love.keyboard.isDown(button.left, button.right, button.up, button.down) then
+ if love.keyboard.isDown(button.start) then
+ walkDown(dt)
+ elseif love.keyboard.isDown(button.select) then
+ walkDown(dt)
+ elseif love.keyboard.isDown(button.a) then
+ walkDown(dt)
+ elseif love.keyboard.isDown(button.b) then
+ walkDown(dt)
+ elseif love.keyboard.isDown(button.left, button.right, button.up, button.down) then
if love.keyboard.isDown(button.left) then
walkLeft(dt)
elseif love.keyboard.isScancodeDown(button.right) then
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/player/1/button.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/player/1/button.lua
index 2fa1e36..2875f74 100644
--- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/player/1/button.lua
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/player/1/button.lua
@@ -1,11 +1,11 @@
return {
- left = 'a',
- right = 'd',
- up = 'w',
- down = 's',
- button0 = 'j',
- button1 = 'k',
- select = 'g',
- start = 'h',
- quit = 'escape',
+ left = 'a',
+ right = 'd',
+ up = 'w',
+ down = 's',
+ a = 'j',
+ b = 'k',
+ select = 'g',
+ start = 'h',
+ quit = 'escape',
}