virtual void Init( bool isFirstInit ) { IGameManager* pGameManager = (IGameManager*)IObjectUtils::GetUniqueInterface( "GameManager", IID_IGAMEMANAGER ); pGameManager->AddListener(this); m_pGlobalParameters = pGameManager->GetGlobalParameters(); }
virtual void Init( bool isFirstInit ) { m_pEntity->SetUpdateable( this ); m_pCameraControl = (ICameraControl*)IObjectUtils::GetUniqueInterface( "CameraControl", IID_ICAMERACONTROL ); IGameManager* pGameManager = (IGameManager*)IObjectUtils::GetUniqueInterface( "GameManager", IID_IGAMEMANAGER ); pGameManager->AddListener(this); m_pGlobalParameters = pGameManager->GetGlobalParameters(); InitWatch(); InitDocument(false); }
virtual void Init( bool isFirstInit ) { IGameManager* pGameManager = (IGameManager*)IObjectUtils::GetUniqueInterface( "GameManager", IID_IGAMEMANAGER ); pGameManager->AddListener(this); float height, width; PerModuleInterface::g_pSystemTable->pGame->GetWindowSize( width, height ); // Slightly reduce dimensions so object never cross window edges (since their position is in the center of object width -= 50; height -= 50; m_fWorldCenteringDist.SetX( width * width * 0.25f ); m_fWorldCenteringDist.SetZ( height * height * 0.25f ); }