I'm working on cocos2d V3.x project (SpriteBuilder V1.2.1). Currently trying to run this action sequence with a delay on a CCSprite. I'm not sure if there is a problem or maybe I just don't understand how CCActionSequence works.
I want action 'a' to start, when finished (after 2s) a delay (of 5s) and then both functions are called (actions 'c' and 'd'). But in the simulator the order is wrong ('d' is called before 'c') and they are called approximately 1s after 'a' starts rotating.
Am I doing anything wrong? If this is the actual way CCActionSquence works, what can I do to make it work the way I explained in the previous paragraph?
CCAction *a = [CCActionRotateBy actionWithDuration:2 angle:360];
CCAction *b = [CCActionDelay actionWithDuration:5];
CCAction *c = [CCActionCallFunc actionWithTarget:self selector:@selector(limpiarSeleccionadas)];
CCAction *d = [CCActionCallFunc actionWithTarget:self selector:@selector(endTurn)];
[[_arregloBolitas objectAtIndex:random] runAction:[CCActionSequence actionWithArray:@[a,b,c,d]]];
Thanks!