This code works:
cocos2d::MoveBy* action = myCreateAction();
cocos2d::Animate* animation = myCreateAnimation();
cocos2d::Spawn* moving = cocos2d::Spawn::createWithTwoActions(action, animation);
runAction(moving);
This code works too, but animation is longer than action, therefore action are discontinuous:
cocos2d::MoveBy* action = myCreateAction();
cocos2d::Animate* animation = myCreateAnimation();
cocos2d::Spawn* moving = cocos2d::Spawn::createWithTwoActions(action, animation);
runAction(cocos2d::RepeatForever::create(moving));
If I run this code:
cocos2d::RepeatForever* action = cocos2d::RepeatForever::create(myCreateAction());
cocos2d::RepeatForever* animation = cocos2d::RepeatForever::create(myCreateAnimation());
cocos2d::Spawn* moving = cocos2d::Spawn::createWithTwoActions(action, animation);
runAction(moving);
Nothing happens. Why?