1
\$\begingroup\$

I have two CCActions : CCAction *a; CCAction *b;

so how to use CCSequence with two CCActions Thanks

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$
CCFiniteTimeAction *example = CCSequence::create(a, b);

CCSequence

Alternatively you can just run the action on a sprite directly.

\$\endgroup\$
5
  • \$\begingroup\$ No, i'm coding cocos2d-x, not cocos2d, sorry, cocos2dx have less sample \$\endgroup\$
    – user919496
    Mar 11, 2013 at 16:31
  • \$\begingroup\$ @user919496 sorry wasn't paying attention to the tag I'll update my answer. \$\endgroup\$
    – Tony
    Mar 11, 2013 at 16:32
  • \$\begingroup\$ @user919496 I guess it should be something like [CCsequence actions:a b null] or equivalent Obj-C code! \$\endgroup\$
    – Ali1S232
    Mar 11, 2013 at 21:12
  • \$\begingroup\$ now i find one solution : i create one CCArray * arrayAction, then add all action into arrayAction m_sprite-> runAction(CCSequence ::create(arrayAction)); \$\endgroup\$
    – user919496
    Mar 12, 2013 at 3:26
  • \$\begingroup\$ You can do that also. It's in the documentation I linked. You can also do CCSequence::createWithTwoActions(a,b). That doesn't mean my original answer is wrong. Alternatively you can do it the way I said at the end. etc.etc.etc. You should really just go through the documentation. \$\endgroup\$
    – Tony
    Mar 12, 2013 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .