本文整理汇总了C++中MainMenu::Init方法的典型用法代码示例。如果您正苦于以下问题:C++ MainMenu::Init方法的具体用法?C++ MainMenu::Init怎么用?C++ MainMenu::Init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainMenu
的用法示例。
在下文中一共展示了MainMenu::Init方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initializeGame
void Game::initializeGame()
{
std::cout<<"\n\n BOOT UP: LOADING SPRITES: "; //Loading Text
MainMenu* MenuState = new MainMenu();
MenuState->Init(this);
states.push_back(MenuState);
LevelHome* StateHome = new LevelHome();
StateHome->Init(this);
states.push_back(StateHome);
LevelOne* StateOne = new LevelOne();
StateOne->Init(this);
states.push_back(StateOne);
LevelTwo* StateTwo = new LevelTwo();
StateTwo->Init(this);
states.push_back(StateTwo);
LevelThree* StateThree = new LevelThree();
StateThree->Init(this);
states.push_back(StateThree);
UIState* UI = new UIState();
UI->Init(this);
states.push_back(UI);
MessageState* Msg = new MessageState();
Msg->Init(this);
states.push_back(Msg);
}
示例2: wWinMain
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE, LPWSTR, int)
{
MaloW::ClearDebug();
#ifdef INCLUDE_MODEL_VIEWER
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
MaloW::Debug("(DEBUG): Client: Debug flag set to: _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF). ");
MaloW::Debug("(DEBUG): Client: vld.h included.");
#endif
if ( !GraphicsInit(hInstance) )
{
MaloW::Debug("Failed Initializing Graphics!");
return 1;
}
if ( !PlayerSettingsInit() )
{
MaloW::Debug("Failed Initializing PlayerSettings!");
return 1;
}
AudioManager* am = AudioManager::GetInstance();
// IMPLEMENT MAIN PROGRAM HERE.
MainMenu* menu = new MainMenu();
menu->Init();
menu->Run();
SAFE_DELETE(menu);
am->ReleaseInstance();
am = NULL;
// Free Graphics
FreeGraphics();
// Save and Free Settings
SavePlayerSettings();
FreePlayerSettings();
//_CrtDumpMemoryLeaks();
MaloW::Debug("Quit Game.");
return 0;
}