本文整理汇总了C++中CCLayer类的典型用法代码示例。如果您正苦于以下问题:C++ CCLayer类的具体用法?C++ CCLayer怎么用?C++ CCLayer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CCLayer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createTests
CCLayer *Next()
{
++s_nIdx;
s_nIdx = s_nIdx % TEST_SCENEEDITOR_COUNT;
CCLayer *pLayer = createTests(s_nIdx);
pLayer->autorelease();
return pLayer;
}
示例2: nextCocosNodeAction
CCLayer* nextCocosNodeAction()
{
sceneIdx++;
sceneIdx = sceneIdx % MAX_LAYER;
CCLayer* pLayer = createCocosNodeLayer(sceneIdx);
pLayer->autorelease();
return pLayer;
}
示例3: CreateLayer
CCLayer *NextTest()
{
++s_nActionIdx;
s_nActionIdx = s_nActionIdx % TEST_LAYER_COUNT;
CCLayer *pLayer = CreateLayer(s_nActionIdx);
pLayer->autorelease();
return pLayer;
}
示例4: nextEffectAdvanceAction
CCLayer* nextEffectAdvanceAction()
{
sceneIdx++;
sceneIdx = sceneIdx % MAX_LAYER;
CCLayer* pLayer = createEffectAdvanceLayer(sceneIdx);
pLayer->autorelease();
return pLayer;
}
示例5: SceneTestScene
void SceneTestLayer1::onPushSceneTran(CCObject* pSender)
{
CCScene* scene = new SceneTestScene();
CCLayer* pLayer = new SceneTestLayer2();
scene->addChild( pLayer, 0 );
CCDirector::sharedDirector()->pushScene( CCTransitionSlideInT::create(1, scene) );
scene->release();
pLayer->release();
}
示例6: NextAction
CCLayer* NextAction()
{
++s_nActionIdx;
s_nActionIdx = s_nActionIdx % ACTION_LAYER_COUNT;
CCLayer* pLayer = CreateLayer(s_nActionIdx);
pLayer->autorelease();
return pLayer;
}
示例7: nextActionManagerAction
CCLayer* nextActionManagerAction()
{
sceneIdx++;
sceneIdx = sceneIdx % MAX_LAYER;
CCLayer* pLayer = createActionManagerLayer(sceneIdx);
pLayer->autorelease();
return pLayer;
}
示例8: nextZwoptexTest
CCLayer* nextZwoptexTest()
{
sceneIdx++;
sceneIdx = sceneIdx % MAX_LAYER;
CCLayer* pLayer = createZwoptexLayer(sceneIdx);
pLayer->autorelease();
return pLayer;
}
示例9: nextAction
static CCLayer* nextAction()
{
sceneIdx++;
sceneIdx = sceneIdx % MAX_LAYER;
CCLayer* pLayer = (createFunctions[sceneIdx])();
pLayer->autorelease();
return pLayer;
}
示例10: myInit
void ThirdServerScene::myInit() {
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic("bgm_server.mp3",true);
cacheServerId = CCUserDefault::sharedUserDefault()->getIntegerForKey("serverId",-1);
loginTrigger = LoginTrigger::create(this);
loginTrigger->retain();
MyMessageManage::getInstance()->registerTrigger(loginTrigger);
CCLayer* backLayer = CCLayer::create();
CCSprite* background = CCSprite::create("loading.jpg");
// background->setScale(winSize.height/background->getContentSize().height);
background->setAnchorPoint(ccp(0.5,0));
background->setPositionX(winSize.width/2);
backLayer->addChild(background);
CCSprite* logo = CCSprite::create("logo.png");
logo->setPosition(ccp(winSize.width-190,winSize.height-120));
backLayer->addChild(logo,2);
CCSprite* shadow = CCSprite::createWithSpriteFrameName("serverShadow.png");
shadow->setScale((winSize.height+10)/shadow->getContentSize().height);
shadow->setPosition(ccp(winSize.width-138,winSize.height/2));
backLayer->addChild(shadow);
CCSprite* listLabel = CCSprite::createWithSpriteFrameName("serverListLabel.png");
listLabel->setAnchorPoint(ccp(0,1));
listLabel->setPosition(ccp(winSize.width-270,100));
backLayer->addChild(listLabel,1);
if (beans->count() == 0) {
this->addChild(MyUtil::getInstance()->getServerTipDialog("连接服务器失败,\n请检测网络!",this,menu_selector(ServerScene::exitGame)),5);
return;
}
SeverInfoBean* bean = NULL;
CCObject* obj;
CCARRAY_FOREACH(beans,obj) {
if (cacheServerId == ((SeverInfoBean*)obj)->serverId) {
bean = (SeverInfoBean*)obj;
break;
}
}
if (bean == NULL) {
bean =(SeverInfoBean*) beans->objectAtIndex(beans->count()-1);
}
initServerInfo(bean);
this->addChild(backLayer);
}
示例11: nextSchedulerTest
CCLayer* nextSchedulerTest()
{
sceneIdx++;
sceneIdx = sceneIdx % MAX_LAYER;
CCLayer* pLayer = (createFunctions[sceneIdx])();
pLayer->init();
pLayer->autorelease();
return pLayer;
}
示例12: BackAction
CCLayer* BackAction()
{
--s_nActionIdx;
if( s_nActionIdx < 0 )
s_nActionIdx += ACTION_LAYER_COUNT;
CCLayer* pLayer = CreateLayer(s_nActionIdx);
pLayer->autorelease();
return pLayer;
}
示例13: HelloWorld
CCScene* HelloWorld::scene()
{
// 'scene' is an autorelease object
CCScene *scene = CCScene::node();
CCLayer* layer = new HelloWorld();
scene->addChild(layer);
layer->release();
return scene;
}
示例14: CCARRAY_FOREACH
bool MyAboutLayer::init()
{
CCArray *array = CCDirector::sharedDirector()->getRunningScene()->getChildren();
CCObject *object = NULL;
int i=0;
CCARRAY_FOREACH(array, object)
{
i++;
CCLayer *layer = (CCLayer*) object;
layer->onExit();
}
示例15: runTouchesTest
void runTouchesTest()
{
s_nTouchCurCase = 0;
CCScene* pScene = CCScene::node();
CCLayer* pLayer = new TouchesPerformTest1(true, TEST_COUNT, s_nTouchCurCase);
pScene->addChild(pLayer);
pLayer->release();
CCDirector::sharedDirector()->replaceScene(pScene);
}