本文整理汇总了C++中CCMenu::setIsVisible方法的典型用法代码示例。如果您正苦于以下问题:C++ CCMenu::setIsVisible方法的具体用法?C++ CCMenu::setIsVisible怎么用?C++ CCMenu::setIsVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCMenu
的用法示例。
在下文中一共展示了CCMenu::setIsVisible方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pauseResumePressed
void RectWorld::pauseResumePressed()
{
this->resumeSchedulerAndActions();
CCMenu *pItem = (CCMenu *)this->getChildByTag(6);
pItem->setIsVisible(true);
ScoreLayer *scoreLayer = (ScoreLayer *)this->getChildByTag(2);
scoreLayer->setIsVisible(true);
TimeLayer *timeLayer = (TimeLayer*)this->getChildByTag(4);
timeLayer->setIsVisible(true);
CCMutableArray<CCSprite *> :: CCMutableArrayIterator it;
for(it = _barriers->begin(); it != _barriers->end(); it++)
{
(*it)->resumeSchedulerAndActions();
}
for(it = _stars->begin(); it != _stars->end(); it++)
{
(*it)->resumeSchedulerAndActions();
}
}
示例2: onEnter
//--------------------------------------------------------------
//
//
void COption::onEnter()
{
CCXMLLayer::onEnter();
LoadPlist("option.plist");
const char *MenuButton[] =
{
"button_back", "button_delsave",
};
for( int i = 0; i < 2; i++ )
{
CCSprite *pSprite= (CCSprite*)GetXMLNodeFromKey( MenuButton[i] );
CCMenu *pMenu = CreatGameUIWithSprite( pSprite, menu_selector(COption::menuCallback), i, this, pSprite->getPosition() );
addChild( pMenu, pSprite->getZOrder() );
pMenu->setTag( i );
removeChild( pSprite, true );
}
const char *MenuButton2[] =
{
"button_close1", "button_close2", "button_open1", "button_open2"
};
for( int i = 0; i < 4; i++ )
{
CCSprite *pSprite= (CCSprite*)GetXMLNodeFromKey( MenuButton2[i] );
CCMenu *pMenu = CreatGameUIWithSprite( pSprite, menu_selector(COption::menuSound), i%2, this, pSprite->getPosition() );
addChild( pMenu, pSprite->getZOrder() );
pMenu->setTag( i );
pMenu->setIsVisible( false );
removeChild( pSprite, true );
m_pControlMenu[i] = pMenu;
}
//CCUserDefault::sharedUserDefault()->setBoolForKey("music", true );
//CCUserDefault::sharedUserDefault()->setBoolForKey("sound", true );
schedule( schedule_selector( COption::UpData ), 0.1f );
}
示例3: menuPause
void RectWorld::menuPause(CCObject* pSender)
{
this->pauseSchedulerAndActions();
CCMutableArray<CCSprite*> :: CCMutableArrayIterator it;
for(it = _barriers->begin(); it != _barriers->end(); it++)
{
(*it)->pauseSchedulerAndActions();
}
for(it = _stars->begin(); it != _stars->end(); it++)
{
(*it)->pauseSchedulerAndActions();
}
Pause *pause = Pause::node();
pause->setDelegate(this);
CCMenu *pItem = (CCMenu *)this->getChildByTag(6);
pItem->setIsVisible(false);
ScoreLayer *scoreLayer = (ScoreLayer *)this->getChildByTag(2);
scoreLayer->setIsVisible(false);
ScoreLayer *score = (ScoreLayer*)this->getChildByTag(2);
pause->setDistance(score->getCurrentDistance());
pause->setStar(score->getCurrentStar());
TimeLayer *timeLayer = (TimeLayer*)this->getChildByTag(4);
timeLayer->setIsVisible(false);
this->addChild(pause,5);
}