本文整理汇总了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;
}
示例2: scene
CCScene* GameScene::scene()
{
CCScene* s = CCScene::create();
s->addChild(GameScene::create());
s->setTag(GAMESCENE_TAG);
return s;
}
示例3: scene
CCScene* StartLayer::scene(int tarIndex)
{
CCScene* scene = CCScene::create();
scene->setTag(SceneTypeStart);
auto layer = StartLayer::create(tarIndex);
scene->addChild(layer);
return scene;
}
示例4: scene
CCScene* MainScene::scene()
{
CCScene* scene = MainScene::create();
scene->setTag(Main_SCENE_TAG);
MainLayer* layer = MainLayer::create();
scene->addChild(layer, 0);
return scene;
}
示例5: scene
CCScene* GameLayer::scene()
{
CCScene* scene = CCScene::create();
scene->setTag(SceneTypeGame);
auto layer = GameLayer::create();
scene->addChild(layer);
return scene;
}
示例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;
}
示例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;
}
示例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;
}