summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game
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 14:24:49 -0300
commit6559df9a7c6a69c9235d0cc74831a100289482ce (patch)
tree36200397d2df3293943d27890dc70dea82ea2ce7 /src/gnu_and_bola_-_the_libre_beat_em_up_game
parent30ec8ab455c11d1b80bd18b7e31f52768d8c29b2 (diff)
Add A/B/Select/Start buttons
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game')
-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',
}