Hi Guys! I need some guidelines for cocos2d-iphone runtime.
I need to combine multiple animation for a character, each animation is responsible for a group of bones, basically I need to achieve the same result as the case described in "Combining animations" section of the official documentation:
... first the “walk” animation is applied, then “shoot” is applied. If “shoot” only has keyframes for bones in the torso, the legs will not be affected and will remained posed by the “walk” animation.
The problem is that I am not sure what is the best way to implement this in cocos2d.
I assume that before adding a new animation, I need to add a new animation state and after that set animation for this state:
animationNode = [CCSkeletonAnimation skeletonWithFile:atlasFile:scale:];
[animationNode addAnimationState];
[animationNode setAnimation:@"walk" loop:YES forState:0];
[animationNode setAnimation:@"shoot" loop:YES forState:1];
Is this the right way of combining multiple animations?
Any response or code snippet will be deeply appreciated.