Wait till all CCActions have completed
- by tGilani
I am developing a simple cocos2d game in which I want to animate two CCSprites simultaneously, and for this purpose I simply set CCActions on respective `CCSprite's as follows.
[first runAction:[CCMoveTo actionWithDuration:1 position:secondPosition]];
[second runAction:[CCMoveTo actionWithDuration:1 position:firstPosition]];
Now I want to wait till the animations are complete, so I can perform the next step. How should I wait for these animations to finish?
There are actually two method calls, the first one animates the objects via the code above and second call does the other animation.
I need to delay the second method call until the animations in first are complete. (I would not like to use CCCallFunc blocks as I want to call the second method from the same caller as the first one.