Animation: remove once the animation is complete
This commit is contained in:
parent
f80337e1a5
commit
7cc7ec207d
1 changed files with 3 additions and 0 deletions
|
@ -41,5 +41,8 @@ Animation = Class{
|
|||
|
||||
update = function(self, dt)
|
||||
self.curFrame = self.curFrame + dt * self.frames.fps
|
||||
if self.curFrame >= self.frames.numFrames then
|
||||
self:delete()
|
||||
end
|
||||
end;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue