I have an array of objects (objArray) and an array of actions (actArray). Both arrays are in order, I mean, object at index 0 of objArray has to perform action 0 on actArray.
To make the explanation clear, lets imagine both arrays have 3 objects, obj0, obj1 and obj2.
obj0 has to perform action 0 on actArray
obj1 has to perform action 1 on actArray
obj2 has to perform action 2 on actArray
these 3 operations (or n, in the case of the array) have to happen simultaneously.
When all animations end, I need the method animationsFinished to be called.
How do I do that?
I am beginning in Cocos. I have googled around and have not found any practical example around. I have found CCSpan but I don’t see how this can be used with multiple objects each one with its own action. thanks.
You can just perform the actions sequentially and they will occur at the same time.
Or if you want the animation-is-finished method to be executed only once, just take it out of the for loop.
Edit:
This (I believe) will execute your method once the first action is completed.