本文整理汇总了C++中CCNode::pauseSchedulerAndActions方法的典型用法代码示例。如果您正苦于以下问题:C++ CCNode::pauseSchedulerAndActions方法的具体用法?C++ CCNode::pauseSchedulerAndActions怎么用?C++ CCNode::pauseSchedulerAndActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCNode
的用法示例。
在下文中一共展示了CCNode::pauseSchedulerAndActions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toggle
void Pause::toggle(cocos2d::CCObject*){
paused = !paused;
SimpleAudioEngine::sharedEngine()->playEffect("buttonClick.wav");
Game *g = Utils::getGame();
if(paused==false){
anim->unscheduleAllSelectors();
anim->stopAllActions();
anim->startAnimOut();
g->setTouchEnabled(true);
g->resumeSchedulerAndActions();
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}
else{
anim->unscheduleAllSelectors();
anim->stopAllActions();
anim->startAnimIn();
g->setTouchEnabled(false);
g->pauseSchedulerAndActions();
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}
if(g->getChildren())
for(int i=0;i<g->getChildren()->count();i++){
CCNode *n = (CCNode *) g->getChildren()->objectAtIndex(i);
if(!paused) n->resumeSchedulerAndActions();
else n->pauseSchedulerAndActions();
}
}
示例2: pause
void CCScrollView::pause(CCObject* sender)
{
m_pContainer->pauseSchedulerAndActions();
CCObject* pObj = NULL;
CCArray* pChildren = m_pContainer->getChildren();
CCARRAY_FOREACH(pChildren, pObj)
{
CCNode* pChild = (CCNode*)pObj;
pChild->pauseSchedulerAndActions();
}
示例3: pause
void XCCBReader::pause()
{
CCBAnimationManager* mActionManager = getAnimationManager();
mActionManager->getRootNode()->pauseSchedulerAndActions();
CCDictionary* pDic = mActionManager->getNodeSequences();
CCDictElement* pElement = NULL;
CCDICT_FOREACH(pDic, pElement)
{
CCNode *node = (CCNode*)pElement->getIntKey();
node->pauseSchedulerAndActions();
}