core/assets: don't set as true the restart argument when not passed

This commit is contained in:
Kazhnuz 2019-03-04 12:26:10 +01:00
parent c4a4caf2ac
commit 38b0a732c5
1 changed files with 1 additions and 2 deletions

View File

@ -76,9 +76,8 @@ end
function Animator:changeAnimation(name, restart)
self.currentAnimation = name
self.animationData = self.sprite.data.animations[self.currentAnimation]
local restart = restart or true
if (restart) then
if (restart == true) then
self.frame = self.animationData.startAt
self.frameTimer = 0
end