feat(assets/animator): send the callback when the animation end
This commit is contained in:
parent
e6f0315a8c
commit
60390ed1a7
1 changed files with 1 additions and 0 deletions
|
@ -60,6 +60,7 @@ function Animator:update(dt)
|
||||||
if self.frameTimer > 1 then
|
if self.frameTimer > 1 then
|
||||||
self.frameTimer = 0
|
self.frameTimer = 0
|
||||||
if self.frame == self.animationData.endAt then
|
if self.frame == self.animationData.endAt then
|
||||||
|
self:sendCallback()
|
||||||
if not (self.animationData.pauseAtEnd) then
|
if not (self.animationData.pauseAtEnd) then
|
||||||
self.frame = self.animationData.loop
|
self.frame = self.animationData.loop
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue