I’m creating an instance of CCSequence as follow:
CCAnimate animate = CCAnimate::actionWithDuration;
CCCallFuncNDcallFuncND = CCCallFuncND::actionWithTarget(this, callfuncND_selector(GameLayer::explosionFinished), newSprite);
CCRepeat repeatAction = CCRepeat::actionWithAction;
CCFiniteTimeActionaction = CCSequence::actions(repeatAction, callFuncND);
But there is an error occurred while the CCSequence::actions is called.
I debugging the code of CCSequence, then, I found the problem is the second argument always can’t get the duration.
The problem caused by this line in CCSequence::actions function :
pNow = va_arg(params, CCFiniteTimeAction**);
Variable pNow is not passed correctly, because the va_arg macro.
The alternately solution is to use the actionOneTwo or actionWithArray. The code likes this:
CCFiniteTimeAction**action = CCSequence::actionOneTwo(repeatAction, callFuncND);
Please fix this bug.