Advertisement
tic

Untitled

tic
Dec 12th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (void) playManyActionsOneByOne
  2. {
  3.     // create some actions and add them to the
  4.     // mutable array m_actionsContainer
  5.  
  6.     [self runNextActionInArray];
  7. }
  8.  
  9. - (void) runNexActionInArray
  10. {
  11.     if( [m_actionsContainer count > 0] )
  12.     {
  13.         id nextAction = [m_actionsContainer objectAtIndex:0];
  14.         id callback = [CCCallFunc actionWithTarget: self selector: @selector(runNextActionInArray)];
  15.         id sequence = [CCSequence actionOne: nextActon two: callback];
  16.         [neededNode runAction: sequence];
  17.  
  18.         [m_actionsContainer removeObjectAtIndex:0];
  19.     }    
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement