fix: add setAnimSpeed to Parent entity in cbs

This commit is contained in:
Kazhnuz 2021-07-19 12:12:45 +02:00
parent a61b2e1453
commit d5dec73e7e

View file

@ -84,6 +84,14 @@ function Parent:changeAnimation(animation, restart)
end
end
function Parent:setAnimSpeed(speed)
if (self.sprite.clone == nil) then
self.assets.sprites[self.sprite.name]:setSpeedFactor(speed)
else
self.sprite.clone:setSpeedFactor(speed)
end
end
function Parent:animationEnded(animation)
-- Empty placeholder function
end