fix: add setAnimSpeed to Parent entity in cbs
This commit is contained in:
parent
a61b2e1453
commit
d5dec73e7e
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue