fix: make sure that pauseAtEnd works as intended

This commit is contained in:
Kazhnuz 2019-07-29 08:57:04 +02:00
parent 1041688c8e
commit 88e4d2c36a

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