objective c - Wait method run until CCActionSequence finishes -
In this code [self showWinnerMessage] runs before mySeq is finished. How can I wait until mySprite action is over? Dormant () Everything seems to make sleeping. Well, @ LearnCocos2D already answers auto selector :: @selector (checkWinner - (zero) gameplay {If (actionhappen) {CCActionCallFunc * checkWinner = [CCActionCallFunc actionWithTarget
- (zero) gameplay {if (actionhappen) {CCActionSequence * mySeq = [CCActionSequence actionWithArray: @ [ , Some, action]]; [MySprite Run Action: mySeq]; // it takes 3 seconds} [auto tester]; } - (zero) checkweaver {if (anyWin) {// I want to wait until my SAC action is finished [self show winner message]; }}
: This question in the comment, but here's the code to do this]]; CCActionSequence * mySeq = [CCActionSequence actionWithArray: @ [something, action, checkweaver]]; // Check the note winner [mySprite Run Action: mySeq]; // it takes 3 seconds) Else {// In this case, Fan is called directly [self-tester]; }} - (zero) checkWinner {if (someoneWin) {// I want to wait until mySeq operation is finished [auto showWinnerMessage]; }}
Comments
Post a Comment