Feel free to use my recursive methods:

2Pause:

void GamePlayGuiLayer::RevursivelyPauseAllChildren( CCNode * node ) {
node->pauseSchedulerAndActions();

CCObject * obj;
CCARRAY_FOREACH(node -> getChildren(), obj) {
CCNode * n = (CCNode *)obj;
RevursivelyPauseAllChildren(n); 
}
}

2Resume:

void GamePlayGuiLayer::RevursivelyResumeAllChildren( CCNode * node ) {
node->resumeSchedulerAndActions();

CCObject * obj;
CCARRAY_FOREACH(node -> getChildren(), obj) {
CCNode * n = (CCNode *)obj;
RevursivelyResumeAllChildren(n); 
}
}

- See more at: http://www.cocos2d-x.org/boards/6/topics/6887#sthash.xqm2JwU6.dpuf

posted on 2013-03-02 20:55  纯洁的坏蛋  阅读(209)  评论(0编辑  收藏  举报