当前位置: 首页>>代码示例>>C++>>正文


C++ ShadowLayer::autorelease方法代码示例

本文整理汇总了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);
}
开发者ID:SongCF,项目名称:game-LostStar,代码行数:47,代码来源:BaseScense.cpp


注:本文中的ShadowLayer::autorelease方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。