bool HighscoreScreen::init() { if (!Layer::init()) { return false; } _rootNode = CSLoader::createNode("Screens/HighscoreScreen.csb"); addChild(_rootNode); this->scheduleUpdate(); _myDictionary = __Dictionary::create(); ReadHighscore(); if (_scores[1]->length() == 0) { WriteDefaultHighscore(); ReadHighscore(); } //SPRITES InitSprites(); //Animated Santa Sprite InitAnimation(); //LABELS InitLabels(); //TOUCHES InitControls(); //BUTTONS InitButtons(); return true; }
bool GameScreen::init() { if (!Layer::init()) { return false; } _rootNode = CSLoader::createNode("Screens/MainGame.csb"); addChild(_rootNode); this->scheduleUpdate(); _platform = (Platform*)_rootNode->getChildByName("platform"); _platform = Platform::create(); this->addChild(_platform); _powerUp = (PowerUp*)_rootNode->getChildByName("powerup"); _powerUp = PowerUp::create(); this->addChild(_powerUp); _menuBar = (MenuBar*)_rootNode->getChildByName("menuBar"); _menuBar = MenuBar::create(); this->addChild(_menuBar); //SPRITES InitSprites(); //Animated Santa Sprite InitAnimation(); //LABELS InitLabels(); //TOUCHES InitControls(); //BUTTONS InitButtons(); // Game is not live until the start button is pressed. GameManager::sharedGameManager()->isGameLive = false; GameState(); return true; }
bool FeatureValuesStatistics::Init() { if (InitConnections()==false) return false; if (InitLabels()==false) return false; if (InitThreads()==false) return false; if (SplitMLThreadDataRange(con->GetRecordCount())==false) return false; if (Vi.Create(con->GetRecordCount(),true)==false) { notif->Error("[%s] -> Unable to create value array",ObjectName); return false; } if (con->CreateMlRecord(MainRecord)==false) { notif->Error("[%s] -> Unable to create MainRecord",ObjectName); return false; } // Add extra initialization here return true; }