예제 #1
0
CCScene* Shop::scene() {
	CCScene* scene = CCScene::create();
	scene->retain();
	Shop *layer = Shop::create();
	scene->addChild(layer);
	return scene;
}
예제 #2
0
void worldmap::goback()
{
    scriptVector.clear();
    crewList.clear();
    CCScene * sp = StartPage::scene();
    sp->retain();
    CCDirector::sharedDirector()->replaceScene(sp);
    
}
예제 #3
0
void worldmap::ProductionOfficeButton(){
    if(!xmlLock){
    CCScene * lastscene = worldmap::scene();
    //cout << "lastscene retain count = " << lastscene->retainCount() << endl;
    lastscene->retain();
    previousScene = lastscene;
    //cout << "lastscene retain count = " << lastscene->retainCount() << endl;
    CCScene* po = ProductionOffice::scene();
    CCDirector::sharedDirector()->replaceScene(po);
    }

}
예제 #4
0
//------------------------------------------------------------------------------
bool initScenes(CCScene * pScene, CCScene** inScene, CCScene ** outScene)
{
    CCAssert(pScene != NULL, "Argument scene must be non-nil");

    CCScene * pOutScene = (CCScene*)CCDirector::sharedDirector()->getNotificationNode();
    if (pOutScene == NULL)
    {
        pOutScene = CCScene::create();
        pOutScene->init();
        pOutScene->onEnter();
    }
    
    pOutScene->retain();
    pScene->retain();

    CCAssert(pScene != pOutScene, "Incoming scene must be different from the outgoing scene");
    
    *inScene = pScene;
    *outScene = pOutScene;

    return true;
}