diff options
Diffstat (limited to 'src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua')
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua index 0986487..6bb58c2 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua @@ -3,7 +3,7 @@ local animationModule = {} function animationModule.animation(dt) character.bola.stand.start = character.bola.stand.start + (dt * character.bola.stand.fps) character.bola.walk.start = character.bola.walk.start + (dt * character.bola.walk.fps) --- character.bola.crouch.start = character.bola.crouch.start + (dt * character.bola.crouch.fps) + character.bola.crouch.start = character.bola.crouch.start + (dt * character.bola.crouch.fps) frames = { bola = require 'scripts.bola.frames' @@ -13,12 +13,12 @@ function animationModule.animation(dt) animation = function(start, frames, loop) if math.floor(start) > frames then if loop > 0 then - if loopNumber == nil then + if loopCounter == nil then start = 1 - loopNumber = 1 - elseif loopNumber < loop then + loopCounter = 1 + elseif loopCounter < loop then start = 1 - loopNumber = loopNumber + 1 + loopCounter = loopCounter + 1 else start = frames end @@ -34,7 +34,7 @@ function animationModule.animation(dt) character.bola.stand.start = game.animation(character.bola.stand.start, frames.bola.stand, -1) character.bola.walk.start = game.animation(character.bola.walk.start, frames.bola.walk, -1) --- character.bola.crouch.start = game.animation(character.bola.crouch.start, frames.bola.crouch, -1) + character.bola.crouch.start = game.animation(character.bola.crouch.start, frames.bola.crouch, -1) transform = { bola = { |