summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-12-04 11:43:03 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-12-04 11:43:03 -0300
commitbe92c47794d735812daca917fb1ff6b0d621f948 (patch)
tree53c3d1bfbc4e35341abbf19f92dbf45c763d2012 /src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua
parente474d4bf0565a46e59cad616f2cf1be8b1536ed2 (diff)
Keep the code more KISS - part 5
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua
new file mode 100644
index 0000000..d260891
--- /dev/null
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion/default.lua
@@ -0,0 +1,32 @@
+update.motion = function(dt)
+ game.animation(character.bola.stand, dt)
+ metaSprites.bola.quad = character.bola.stand[character.bola.stand.currentFrame]
+
+ if character.bola.jump.higher > 0 and character.bola.actionA == true then
+ jump(dt)
+ end
+
+ if character.bola.actionLeft == true and character.bola.actionRight == false then
+ walkLeft(dt)
+ end
+
+ if character.bola.actionRight == true and character.bola.actionLeft == false then
+ walkRight(dt)
+ end
+
+ if character.bola.actionLeft == true and character.bola.actionRight == true then
+ stand(dt)
+ end
+
+ if character.bola.actionUp == true and character.bola.actionDown == false then
+ walkUp(dt)
+ end
+
+ if character.bola.actionDown == true and character.bola.actionUp == false then
+ walkDown(dt)
+ end
+
+ if character.bola.actionUp == true and character.bola.actionDown == true then
+ stand(dt)
+ end
+end