fix(assets): add "return" call that were forgotten

This commit is contained in:
Kazhnuz 2019-06-23 15:29:08 +02:00
parent dca4ece7fe
commit 5c5b3eed34

View file

@ -238,9 +238,9 @@ end
function BaseActor:getCurrentAnimation()
if (self.sprite.clone == nil) then
self.assets.sprites[self.sprite.name]:getCurrentAnimation()
return self.assets.sprites[self.sprite.name]:getCurrentAnimation()
else
self.sprite.clone:getCurrentAnimation()
return self.sprite.clone:getCurrentAnimation()
end
end
@ -252,9 +252,9 @@ end
function BaseActor:getFrame()
if (self.sprite.name ~= nil) then
if (self.sprite.clone ~= nil) then
self.sprite.clone:getFrame()
return self.sprite.clone:getFrame()
else
self.assets.sprites[self.sprite.name]:getFrame()
return self.assets.sprites[self.sprite.name]:getFrame()
end
end
end
@ -262,9 +262,9 @@ end
function BaseActor:getRelativeFrame()
if (self.sprite.name ~= nil) then
if (self.sprite.clone ~= nil) then
self.sprite.clone:getRelativeFrame()
return self.sprite.clone:getRelativeFrame()
else
self.assets.sprites[self.sprite.name]:getRelativeFrame()
return self.assets.sprites[self.sprite.name]:getRelativeFrame()
end
end
end
@ -272,9 +272,9 @@ end
function BaseActor:getAnimationDuration()
if (self.sprite.name ~= nil) then
if (self.sprite.clone ~= nil) then
self.sprite.clone:getAnimationDuration()
return self.sprite.clone:getAnimationDuration()
else
self.assets.sprites[self.sprite.name]:getAnimationDuration()
return self.assets.sprites[self.sprite.name]:getAnimationDuration()
end
end
end