//init world init game for a certain level World* World::initWorld(Node* backgroundLayer, Node* actionLayer, Node* HUDnode) { this->backgroundNode = backgroundLayer; this->actionNode = actionLayer; this->hudNode = HUDnode; swiss = NULL; score = 0; CCLOG("Created the world"); //initialize the Pools initSpriteCache(); //initialize all the game objects/entities initCommonComps(); initPools(); initPlayers(); //initialize all the entity runners initRunners(); infoPanel = new InformationPanel(); if (!Config::instance()->debug_mode) {//if debug mode is turned off spawningPool = new ZombieSpawningPool(); if (spawningPool) spawningPool->init(); } destroyFlag = false; return this; }
Globals::Globals(Config *config) : config_(config), loader_(new Loader()), handlerSet_(new HandlerSet()), componentSet_(new ComponentSet()), logger_(NULL) { loader_->init(config); componentSet_->init(this); handlerSet_->init(config, componentSet_.get()); initLogger(); initPools(); startThreadPools(); }
bool BlockManager::init() { if (!Node::init()) { return false; } initPools(); reset(); return true; }