Пример #1
0
CometConquestGame::CometConquestGame(GameOptions const &options)
	: CometConquestBaseGame(options)
	, m_Lifetime(0)
	, m_StartPosition(6.0f, 1.5f, 3.0f)
	, m_HumanPlayersAttached(0)
{
	m_pPhysics.reset(CreateGamePhysics());
	m_data.m_lastCometTime = timeGetTime();
	m_cometConquestEventListener = shared_ptr<CometConquestEventListener> (GCC_NEW CometConquestEventListener ( this ) );
	safeAddListener( m_cometConquestEventListener, EvtData_Remote_Client::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_PhysCollision::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_New_Actor::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_Destroy_Actor::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_Move_Actor::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_Request_New_Actor::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_Request_Start_Game::sk_EventType );
	safeAddListener( m_cometConquestEventListener, EvtData_Network_Player_Actor_Assignment::sk_EventType );

	extern void ListenForCometConquestGameCommands(EventListenerPtr listener);
	ListenForCometConquestGameCommands(m_cometConquestEventListener);
}
Пример #2
0
//
// TeapotWarsLogic::TeapotWarsLogic
//
TeapotWarsLogic::TeapotWarsLogic()
{
	m_pPhysics.reset(CreateGamePhysics());
    RegisterAllDelegates();
}