summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge <jorginho@riseup.net>2016-11-21 23:12:12 +0100
committerJorge <jorginho@riseup.net>2016-11-21 23:12:12 +0100
commit5aa5ef2d0c437aa7615faf8a270a2bbd17bea9bf (patch)
treef88dc54d8786d2bb630b6fae6503769f6512d527
parentc7fd30e293dbb8fe3049716951c2e369afcb97e5 (diff)
Change while sprites refresh to if
-rw-r--r--test0/main.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test0/main.lua b/test0/main.lua
index 5919324..032cba8 100644
--- a/test0/main.lua
+++ b/test0/main.lua
@@ -158,12 +158,12 @@ function love.update(dt)
}
}
- while character.bola.spriteStand.start >= frames.bola.spriteStand do
- character.bola.spriteStand.start = character.bola.spriteStand.start - (frames.bola.spriteStand - 1)
+ if character.bola.spriteStand.start >= frames.bola.spriteStand then
+ character.bola.spriteStand.start = 1
end
- while character.bola.spriteWalk.start >= frames.bola.spriteWalk do
- character.bola.spriteWalk.start = character.bola.spriteWalk.start - (frames.bola.spriteWalk - 1)
+ if character.bola.spriteWalk.start >= frames.bola.spriteWalk then
+ character.bola.spriteWalk.start = 1
end
animation = {