Search code examples
cocos2d-iphoneccspriteccaction

Sequential cocos2d actions on different nodes


I need to run sequential cocos2d actions on different nodes. I know about CCSequence but that is not good for me since it allows running sequence of actions on the same node. How would I go about running sequential actions for this scenario:

  • Move parent;
  • Move two child nodes simultaneously;
  • Move parent again;

Solution

  • Add a CCCallFunc to your sequence then in the function that it calls, start a new sequence on a different node.

    Rinse and repeat for each separate node you want to move.