Hello,
Here is what I am intending to do. I have a sprite that is running 2 actions simultaneously like this:
[mySprite runAction:myAction1];
[mySprite runAction:myAction2];
And I need to call a function once those actions complete right now all I am doing is adding this line below those 2:
[self schedule:@selector(actionFinished:) interval:myAction1duration];
This is working fine, but I know there is probably a way to do this better. Is there a callback for those functions?. What I want to do is something like this
id Sequence = [Sequence actions: myAction1, myAction2, callFunc, nil];
I know this will call my function after myAction2 is finished. The problem is I need myAction1 and my Action2 to be "grouped" as an Action and then call the function in my sequence something like this:
id Sequence = [Sequence actions:myAction1andmyAction2, callFunc, nil];
How can I achieve this?, or what would be a workaround this? (Besides the one I already have of simply calling the selector after the actions duration time).
Thank you.
-Oscar