summaryrefslogtreecommitdiff
path: root/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua')
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua
index 3efc9c7..c43db43 100644
--- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua
+++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/motion.lua
@@ -17,19 +17,23 @@ game.motion = function(metaSprites, character, dt)
end
if character.actionLeft == true and character.actionRight == false then
- game.animation(character.walk, dt)
- metaSprites.quad = character.walk[character.walk.currentFrame]
+ if character.actionUp == false and character.actionDown == false then
+ game.animation(character.walk, dt)
+ metaSprites.quad = character.walk[character.walk.currentFrame]
+ end
character.position.x = character.position.x - (character.velocity * dt)
character.scale.x = -1
end
if character.actionRight == true and character.actionLeft == false then
- game.animation(character.walk, dt)
- metaSprites.quad = character.walk[character.walk.currentFrame]
+ if character.actionUp == false and character.actionDown == false then
+ game.animation(character.walk, dt)
+ metaSprites.quad = character.walk[character.walk.currentFrame]
+ end
character.position.x = character.position.x + (character.velocity * dt)
- character.scale.x = 1
+ character.scale.x = 1
end
if character.actionLeft == true and character.actionRight == true then
@@ -56,5 +60,9 @@ game.motion = function(metaSprites, character, dt)
if character.actionUp == true and character.actionDown == true then
game.animation(character.stand, dt)
metaSprites.quad = character.stand[character.stand.currentFrame]
+ if character.actionLeft == true then
+ end
+ if character.actionRight == true then
+ end
end
end