diff options
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts')
3 files changed, 10 insertions, 11 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua index 8df932a..2a6250a 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/draw/default.lua @@ -9,5 +9,5 @@ main.draw = function() draw.fps() draw.scale() draw.printFPS() - draw.player1 = game.draw(metaSprites.bola, quad.bola, character.bola) + draw.player1 = game.draw(metaSprites.bola, character.bola) end diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua index 43266bb..0e0b603 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/game/draw.lua @@ -1,7 +1,7 @@ -game.draw = function(metaSprites, quad, character) +game.draw = function(metaSprites, character) love.graphics.draw( metaSprites.image, - quad, + metaSprites.quad, character.position.x, character.position.y, character.orientation, diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua index 2eada30..6de1e63 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/update/motion.lua @@ -2,8 +2,7 @@ require 'scripts.game.animation' update.motion = function(dt) game.animation(character.bola.stand, dt) - quad = {} - quad.bola = character.bola.stand[character.bola.stand.currentFrame] + metaSprites.bola.quad = character.bola.stand[character.bola.stand.currentFrame] if character.bola.jump.higher > 0 and character.bola.actionA == true then jump(dt) @@ -40,26 +39,26 @@ function jump(dt) character.bola.jump.velocity = character.bola.jump.velocity + character.bola.jump.height * (dt / character.bola.jump.higherMax) -- game.animation(character.bola.jump, dt) - -- quad.bola = character.bola.jump[character.bola.jump.currentFrame] + -- metaSprites.bola.quad = character.bola.jump[character.bola.jump.currentFrame] end end function stand(dt) game.animation(character.bola.stand, dt) - quad.bola = character.bola.stand[character.bola.stand.currentFrame] + metaSprites.bola.quad = character.bola.stand[character.bola.stand.currentFrame] end function walkLeft(dt) character.bola.position.x = character.bola.position.x - (character.bola.velocity * dt) game.animation(character.bola.walk, dt) - quad.bola = character.bola.walk[character.bola.walk.currentFrame] + metaSprites.bola.quad = character.bola.walk[character.bola.walk.currentFrame] character.bola.scale.x = -1 end function walkRight(dt) character.bola.position.x = character.bola.position.x + (character.bola.velocity * dt) game.animation(character.bola.walk, dt) - quad.bola = character.bola.walk[character.bola.walk.currentFrame] + metaSprites.bola.quad = character.bola.walk[character.bola.walk.currentFrame] character.bola.scale.x = 1 end @@ -67,12 +66,12 @@ function walkUp(dt) character.bola.position.y = character.bola.position.y - (character.bola.velocity * dt) character.bola.jump.ground = character.bola.position.y game.animation(character.bola.walk, dt) - quad.bola = character.bola.walk[character.bola.walk.currentFrame] + metaSprites.bola.quad = character.bola.walk[character.bola.walk.currentFrame] end function walkDown(dt) character.bola.position.y = character.bola.position.y + (character.bola.velocity * dt) character.bola.jump.ground = character.bola.position.y game.animation(character.bola.walk, dt) - quad.bola = character.bola.walk[character.bola.walk.currentFrame] + metaSprites.bola.quad = character.bola.walk[character.bola.walk.currentFrame] end |