objective c - Wait method run until CCActionSequence finishes -


postproperty postcode>

  - (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]; }}   

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.

itemprop = "text">

Well, @ LearnCocos2D already answers auto selector :: @selector (checkWinner - (zero) gameplay {If (actionhappen) {CCActionCallFunc * checkWinner = [CCActionCallFunc actionWithTarget

 : 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

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -