-(void) gameplay
{
if (actionhappen){
CCActionSequence *mySeq = [CCActionSequence actionWithArray:@[do,some,action]];
[mySprite runAction:mySeq]; // it takes 3 seconds.
}
[self checkWinner];
}
-(void)checkWinner{
if (someoneWin){
// I want to wait here until mySeq action finished
[self showWinnerMessage];
}
}
대기 방법을 실행 CCActionSequence이 코드에서
[자기 showWinnerMessage]를 마칠 때까지 실행됩니다.
mySprite 동작이 완료 될 때까지 어떻게 기다릴 수 있습니까?
수면()이 모든 것을 잠자 게 만드는 것 같습니다.
runblock/performselector 행동이있다, – LearnCocos2D
덕분에 내가 할 수있는 LearnCocos2D 순서의 마지막에 1 점을 추가하는 듯를 runblock/performselector를 사용하면 runAction이 항상 발생하지는 않습니다. 기사를 업데이트했습니다. – whitebear