本文整理汇总了C++中ShadowLayer::autorelease方法的典型用法代码示例。如果您正苦于以下问题:C++ ShadowLayer::autorelease方法的具体用法?C++ ShadowLayer::autorelease怎么用?C++ ShadowLayer::autorelease使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShadowLayer
的用法示例。
在下文中一共展示了ShadowLayer::autorelease方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initAllGameLayerNeedLayers
void BaseScense::initAllGameLayerNeedLayers()
{
mContentLayerWapper = BaseContentWrapLayer::createLayer(this);
setContentLayerWapper(mContentLayerWapper);
mMenuLayer = new MenuLayer(mSceneIndex);
mMenuLayer->autorelease();
mMenuLayer->setBaseScene(this);
addChild(mMenuLayer, 129);
GameLayerFactory* layerFactory = GameLayerFactory::getInstance();
std::pair<int, int> info = layerFactory->getLevelFormat(mSceneIndex);
seasonId = info.first;
sectionId = info.second;
//添加底部星星评价
const ConfigSectionInfo* curLevelinfo = GameLayerFactory::getInstance()->getConfigSectionInfo(seasonId, sectionId);
StarState* pBar = StarState::create(curLevelinfo->iPefect_Gold, curLevelinfo->iBest_Gold);
pBar->setPosition(ccp(0, -g_iTaiJieHight));
mContentLayerWapper->addChild(pBar, 10001, Tag_StarStateBar);
mMenuLayer->setStarState(pBar);
mBackgroundLayer = BackgroudLayerFactory::createBgLayer(seasonId, sectionId);
notificationLayer = AchievementNotification::create();
addChild(notificationLayer, 128,Tag_Layer_Notification); // 放在最上层
guideLayer = GuideLayerFactory::getFactory()->getGuideLayer(seasonId,sectionId);
guideLayer->setBaseScene(this);
setGuideLayer(guideLayer);
guideLayer->setTouchEnabled(false);
guideLayer->setVisible(false);
ShadowLayer* shadowLayer = new ShadowLayer();
shadowLayer->autorelease();
WaitTimeToClickLayer* waitLayer = new WaitTimeToClickLayer();
waitLayer->autorelease();
addChild(waitLayer,1,Tag_Layer_WatingLayer);
CCLayer* bgCover = CCLayer::create();
mContentLayerWapper->getWrapper()->addChild(bgCover,-1,Tag_Layer_Background_Cover);
mContentLayerWapper->getWrapper()->addChild(shadowLayer,0,Tag_Layer_shadow);
mContentLayerWapper->addChild(mBackgroundLayer,-1,Tag_Layer_Background);
}