CCScene* Shop::scene() { CCScene* scene = CCScene::create(); scene->retain(); Shop *layer = Shop::create(); scene->addChild(layer); return scene; }
void worldmap::goback() { scriptVector.clear(); crewList.clear(); CCScene * sp = StartPage::scene(); sp->retain(); CCDirector::sharedDirector()->replaceScene(sp); }
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); } }
//------------------------------------------------------------------------------ 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; }