Beispiel #1
0
void TGame::AfterInitialization()
{
	nel::TTGUIApplication::AfterInitialization();

	#ifdef USE_OVERLAY
	// add the overlay scene
	Overlay = std::make_shared<TOverlayView>(GameState);
	AttachView(Overlay);
	#endif

	// register our game states
	Factory.RegisterObjectType(SID_Splash, std::bind(&TGame::CreateState_Splash, this));
	Factory.RegisterObjectType(SID_Menu, std::bind(&TGame::CreateState_Menu, this));
	Factory.RegisterObjectType(SID_Options, std::bind(&TGame::CreateState_Options, this));	
	Factory.RegisterObjectType(SID_ServerSelect, std::bind(&TGame::CreateState_ServerSelect, this));
	Factory.RegisterObjectType(SID_ServerConnect, std::bind(&TGame::CreateState_ServerConnect, this));
	Factory.RegisterObjectType(SID_Lobby, std::bind(&TGame::CreateState_Lobby, this));
	Factory.RegisterObjectType(SID_LoadMatch, std::bind(&TGame::CreateState_LoadMatch, this));
	Factory.RegisterObjectType(SID_Play, std::bind(&TGame::CreateState_Play, this));
	Factory.RegisterObjectType(SID_RoundEnd, std::bind(&TGame::CreateState_RoundEnd, this));
	Factory.RegisterObjectType(SID_MatchEnd, std::bind(&TGame::CreateState_MatchEnd, this));

	AddLogic(Server);
	AddLogic(Client);
}
Beispiel #2
0
//初始化
void AdvancedFrame::Initial( int wid, int hei, char* wndName, char* icon, bool fullscreen )
{
	GameFrame::Initial( wid, hei, wndName, icon, fullscreen );

	//添加高级2D渲染模块的Logic
	m_adv2d = CREATE_LOGIC( Advanced2D );
	AddLogic( "AdvancedGraph", m_adv2d );

}