diff options
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.lua | 32 |
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 |