fix(assets/animator): make sure that pauseAtEnd works as intended

Fixes #37
This commit is contained in:
Kazhnuz 2019-09-07 20:46:00 +02:00
parent 3a696ee58c
commit f61f529302

View file

@ -60,7 +60,9 @@ function Animator:update(dt)
if self.frameTimer > 1 then
self.frameTimer = 0
if self.frame == self.animationData.endAt then
self.frame = self.animationData.loop
if not (self.animationData.pauseAtEnd) then
self.frame = self.animationData.loop
end
else
self.frame = self.frame + 1
end