I need to create a sequence that runs one action, then repeats tho other actions forever. But creating a sequence with an action and a RepeatForever is impossible. You can see my code below:
auto firstRight = MoveTo::create(1.0f, Vec2(mTopRightPos, spriteYPos));
auto moveRight = MoveTo::create(2.0f, Vec2(mTopRightPos, spriteYPos));
auto moveLeft = MoveTo::create(2.0f, Vec2(mTopLeftPos, spriteYPos));
auto seq = Sequence::create(moveLeft, moveRight, nullptr);
auto repeat = RepeatForever::create(seq);
auto mainSeq = Sequence::create(firstRight, repeat);
mSprite1->runAction(mainSeq);
Create the repeat action in callback.