本文整理汇总了C++中Test::GetScreenId方法的典型用法代码示例。如果您正苦于以下问题:C++ Test::GetScreenId方法的具体用法?C++ Test::GetScreenId怎么用?C++ Test::GetScreenId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Test
的用法示例。
在下文中一共展示了Test::GetScreenId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnAppStarted
void GameCore::OnAppStarted()
{
DeviceInfo();
SettingsManager::Instance()->InitWithFile("~res:/Config/config.yaml");
cursor = 0;
RenderManager::Instance()->SetFPS(60);
String dirPath = "~res:/3d/Maps/";
Vector<String> levelsPaths;
YamlParser* parser = YamlParser::Create("~res:/maps.yaml");
if(parser)
{
YamlNode* rootNode = parser->GetRootNode();
if(rootNode)
{
int32 sz = rootNode->GetCount();
for(DAVA::int32 i = 0; i < sz; ++i)
{
String k = rootNode->GetItemKeyName(i);
String levelFile = rootNode->Get(i)->AsString();
if(k != "default")
levelsPaths.push_back(levelFile);
}
}
}
for(Vector<String>::const_iterator it = levelsPaths.begin(); it != levelsPaths.end(); ++it)
{
Test *test = new Test(dirPath + (*it));
if(test != NULL)
{
UIScreenManager::Instance()->RegisterScreen(test->GetScreenId(), test);
tests.push_back(test);
}
}
if(levelsPaths.size() > 0)
{
appFinished = false;
testCount = tests.size();
Test *firstTest = tests.front();
UIScreenManager::Instance()->SetFirst(firstTest->GetScreenId());
}
else
{
appFinished = true;
}
ConnectToDB();
}
示例2: Update
void GameCore::Update(float32 timeElapsed)
{
ApplicationCore::Update(timeElapsed);
if(!appFinished)
{
Test *curTest = tests.front();
if(curTest->IsFinished())
{
if(resultScreen == NULL)
{
resultScreen = new ResultScreen(curTest->GetLandscapeTestData(),
curTest->GetFileName(),
curTest->GetLandscapeTexture());
UIScreenManager::Instance()->RegisterScreen(RESULT_SCREEN, resultScreen);
UIScreenManager::Instance()->SetScreen(RESULT_SCREEN);
}
if(resultScreen->IsFinished())
{
tests.pop_front();
if(tests.size() == 0)
{
appFinished = true;
}
else
{
SafeRelease(resultScreen);
Test *newCurTest = tests.front();
if(newCurTest != NULL)
{
UIScreenManager::Instance()->SetScreen(newCurTest->GetScreenId());
}
}
SafeRelease(curTest);
}
}
}
else
{
Core::Instance()->Quit();
}
}