diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-11-24 01:25:37 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2016-11-24 01:25:37 -0300 |
commit | 0f68cb1c60545750b7bf5466b4575be53483768e (patch) | |
tree | b3bacda0fa6b721170446d29f9597bc5742c4999 /src | |
parent | 09e8c21150e01cb674972966e6a9628bf5df0caa (diff) |
Rename loopNumber to loopCounter and add more *.bola.crouch*
Diffstat (limited to 'src')
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua | 12 | ||||
-rw-r--r-- | src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/frames.lua | 5 |
2 files changed, 9 insertions, 8 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 = { diff --git a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/frames.lua b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/frames.lua index dc499dd..77999e6 100644 --- a/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/frames.lua +++ b/src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/frames.lua @@ -1,4 +1,5 @@ return { - stand = # character.bola.stand, - walk = # character.bola.walk, + stand = # character.bola.stand, + walk = # character.bola.walk, + crouch = # character.bola.crouch, } |