core/assets: add a function to clone sprite

This commit is contained in:
Kazhnuz 2019-03-03 20:06:02 +01:00
parent 80d3d7e4d4
commit 343127cd7f
1 changed files with 4 additions and 0 deletions

View File

@ -42,6 +42,10 @@ function Sprite:update(dt)
self.animator:update(dt)
end
function Sprite:clone()
return Animator(self)
end
function Sprite:setCustomSpeed(customSpeed)
self.animator:setCustomSpeed(customSpeed)
end