void prepare(TestInfo info) { //Loading::initRW(); ADDeviceEmulator::runLater(1.5f, [info]() { info.finish(); }); }
void playGame(TestInfo info, const char* table) { TableCells table_cells; int x=0; int y=0; int max_ell = Cell::N -1; for(int i=0; i<Cell::N*Cell::N; ++i) { x = i%4; y = max_ell - i/4; if(table[i] != '-') { Letter curr_letter(table[i]); table_cells.setLetter(x,y,curr_letter); } } int64_t score = 25000; SessionManager::getInstance()->beginTheGame(); SessionManager::getInstance()->tableChanged(table_cells); SessionManager::getInstance()->scoreChanged(score); CCDirector::sharedDirector()->replaceScene(PlayScene::scene(GameMode::Continue)); ADDeviceEmulator::runLater(1.5f, [info](){ ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void purchaseBuy(TestInfo info) { CCDirector::sharedDirector()->replaceScene(SettingsScene::scene(true)); ADDeviceEmulator::runLater(2.5f, [info](){ ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openSettings(TestInfo info) { CCDirector::sharedDirector()->replaceScene(SettingsScene::scene()); ADDeviceEmulator::runLater(1.5f, [info](){ ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void continueGame(TestInfo info) { CCDirector::sharedDirector()->replaceScene(PlayScene::scene(GameMode::Continue)); ADDeviceEmulator::runLater(1.5f, [info](){ ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openLevelScene(TestInfo info, CollectionID id, int difficulty) { CCDirector::sharedDirector()->replaceScene(LevelScene::scene(id,difficulty)); ADDeviceEmulator::runLater(2.5f, [info](){ ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openAllCollectionsScene(TestInfo info) { CCDirector::sharedDirector()->replaceScene(SelectCollection::scene()); ADDeviceEmulator::runLater(2.5f, [info](){ ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openMainScene(TestInfo info) { CCDirector::sharedDirector()->replaceScene(MainMenu::scene()); ADDeviceEmulator::runLater(2.5f, [info]() { ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openOneCollectionScene(TestInfo info, int collection_number) { Collection* collection = RW::getCollectionByIndex(collection_number); CCDirector::sharedDirector()->replaceScene(SelectLevel::scene(collection)); ADDeviceEmulator::runLater(2.5f, [info]() { ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openAllCollectionScene(TestInfo info, bool first_collections) { // 'scene' is an autorelease object CCScene *scene = CCScene::create(); // 'layer' is an autorelease object SelectCollection *layer = SelectCollection::create(); BackgroundHolder::backgroundSwitchTo(scene,0,false); scene->addChild(layer); CCDirector::sharedDirector()->replaceScene(scene); //move scroll zone if(!first_collections) layer->moveCollectionScrollZone(); ADDeviceEmulator::runLater(4.5f, [info]() { ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }
void openOneLevelScene(TestInfo info, int collection_number, int level_number, int free_space_id) { Collection* collection = RW::getCollectionByIndex(collection_number); //get level std::vector<Level*> levels = collection->getLevels(); Level* level; for(unsigned int i=0; i<levels.size() ; ++i) { if(levels[i]->getLevelID() == level_number) { level = levels[i]; break; } } // 'scene' is an autorelease object CCScene *scene = CCScene::create(); // 'layer' is an autorelease object LevelScene *layer = LevelScene::create(level); BackgroundHolder::backgroundSwitchTo(scene,0,false); scene->addChild(layer); CCDirector::sharedDirector()->replaceScene(scene); layer->clickEquationSpace(free_space_id); ADDeviceEmulator::runLater(3.5f, [info]() { ADDeviceEmulator::createScreenShoot(info); info.finish(); }); }