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


C++ CCScene::setTag方法代码示例

本文整理汇总了C++中CCScene::setTag方法的典型用法代码示例。如果您正苦于以下问题:C++ CCScene::setTag方法的具体用法?C++ CCScene::setTag怎么用?C++ CCScene::setTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CCScene的用法示例。


在下文中一共展示了CCScene::setTag方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: scene

cocos2d::CCScene* InGameScene::scene()
{
	CCScene *scene = NULL;
	do
	{
		scene = CCScene::create();
        scene->setTag(TAG_INGAMESCENE);
		CC_BREAK_IF(!scene);

        pUILayer = CCLayer::create();
        CC_BREAK_IF(!pUILayer);
        pUILayer->setTag(TAG_INGAMEUILAYER);
        scene->addChild(pUILayer, 1000);
        
		InGameScene *layer = InGameScene::create();
//        layer->setTag(TAG_INGAMELAYER);
		CC_BREAK_IF(!layer);

        
        
		layer->setTag(INGAME);
		scene->addChild(layer);
        
        pScene = scene;
        
	} while(0);

	return scene;
}
开发者ID:JungHanter,项目名称:SWMTAMA,代码行数:29,代码来源:InGameScene.cpp

示例2: scene

CCScene* GameScene::scene()
{
	CCScene* s = CCScene::create();
	s->addChild(GameScene::create());
	s->setTag(GAMESCENE_TAG);
	return s;
}
开发者ID:kjiwu,项目名称:Snake,代码行数:7,代码来源:GameScene.cpp

示例3: scene

CCScene* StartLayer::scene(int tarIndex)
{
    CCScene* scene = CCScene::create();
    scene->setTag(SceneTypeStart);
    auto layer = StartLayer::create(tarIndex);
    
    scene->addChild(layer);
    
    return scene;
}
开发者ID:mrktj,项目名称:SlotGame,代码行数:10,代码来源:StartLayer.cpp

示例4: scene

CCScene* MainScene::scene()
{
	CCScene* scene = MainScene::create();
	scene->setTag(Main_SCENE_TAG);

	MainLayer* layer = MainLayer::create();
	scene->addChild(layer, 0);

	return scene;
}
开发者ID:YuYing-yy,项目名称:DownFloors,代码行数:10,代码来源:MainScene.cpp

示例5: scene

CCScene* GameLayer::scene()
{
    CCScene* scene = CCScene::create();
    scene->setTag(SceneTypeGame);
    auto layer = GameLayer::create();
    
    scene->addChild(layer);
    
    return scene;
}
开发者ID:mrktj,项目名称:SlotGame,代码行数:10,代码来源:GameLayer.cpp

示例6: scene

CCScene* Game::scene()
{
    CCScene *sc = CCScene::create();
    sc->setTag(TAG_GAME_SCENE);
    Game *g = Game::create();
    sc->addChild(g, 0, TAG_GAME_LAYER);
    HUD *h = HUD::create();
    sc->addChild(h,1,TAG_HUD);
    Pause *p = Pause::create();
    sc->addChild(p,1,TAG_PAUSE);
    GameOver *go = GameOver::create();
    sc->addChild(go,1,TAG_GAMEOVER);
    return sc;
}
开发者ID:juciefreitas,项目名称:android-cocos2dx,代码行数:14,代码来源:Game.cpp

示例7: scene

CCScene* LevelLayer::scene(int mode)
{
  // 'scene' is an autorelease object
  CCScene *scene = CCScene::create();

  // 'layer' is an autorelease object
  LevelLayer *layer = LevelLayer::create(mode);
    layer->setTag(LAYER_LEVEL);
  // add layer as a child to scene
  scene->addChild(layer);
    scene->setTag(SCENE_LEVEL);

  // return the scene
  return scene;
}
开发者ID:sliuyx,项目名称:FruitConnect,代码行数:15,代码来源:LevelLayer.cpp

示例8: scene

cocos2d::CCScene* LoadingScene::scene()
{
    CCScene *scene = NULL;
	do
	{
		scene = CCScene::create();
        scene->setTag(TAG_LOADINGSCENE);
		CC_BREAK_IF(!scene);
        
		LoadingScene *layer = LoadingScene::create();
		CC_BREAK_IF(!layer);
        
		layer->setTag(LOADING);
		scene->addChild(layer);
	} while(0);
    
	return scene;
}
开发者ID:JungHanter,项目名称:SWMTAMA,代码行数:18,代码来源:LoadingScene.cpp


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