Can I do something like actions queue? For example, I have rotate action on click, but if user clicked 10 times, it's must do all rotations step by step (Now it's cancel last rotation action and starting do new by list clicking)
preguntado el 13 de noviembre de 12 a las 16:11
As i'm concerned there is no functionality in the SDK for that. But you can write a method which is when ever called pushing the action in an array. When done the finished-notification of the animation should return with an delegate a success state. Then you can pop the action from the array and look up if there was pushed another action meanwhile and start over again.
Espero que esto ayude.
Offcourse, what you are looking for is called
CCSequence. Here is an example below:
id moveAction = [CCMoveBy actionWithDuration:2 position:ccp(size.width/2,0)]; id rotateAction = [CCRotateBy actionWithDuration: 1 angle:90.0f]; [mySprite runAction: [CCSequence actions:moveAction, rotateAction, moveAction, rotateAction, nil]];