summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-24 01:25:37 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2016-11-24 15:42:39 -0300
commit55cea67c8b2cc7664d1df203a53aaa1188656863 (patch)
treecdaf5c0b1868c4e8186f11f11289eb671d87c283
parent4276916fbacaf53522c1cfc178a57b63504646a8 (diff)
Rename loopNumber to loopCounter and add more *.bola.crouch*
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/animation.lua12
-rw-r--r--src/gnu_and_bola_-_the_libre_beat_em_up_game/scripts/bola/frames.lua5
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,
}