I just tried your syntax
if self.state == "idle" then
self.animationmanager:SetAnimationSequence(self.state,0.02,200)
end
if self.state == "walk" then
self.animationmanager:SetAnimationSequence(self.state,0.05,200)
end
if self.state == "attack1" then
if self.attackType == 1 then
self.animationmanager:SetAnimationSequence("attack1",0.05,200,1,self,attack1Done)
else
self.animationmanager:SetAnimationSequence("attack2",0.05,200,1,self,attack1Done)
end
end
It doesn't work good and worst than keeping "self." . Keeping all anims calls in UpdateWorld all just works good.
I posted some example , you can play with it.