Inheritance: GameComponent
Exemple #1
0
        public ChunkManager(TerrainRenderer scene, Camera camera, ViewGridProvider viewGridProvider)
        {
            m_scene = scene;
            m_camera = camera;
            m_viewGridProvider = viewGridProvider;

            // XXX
            m_game = (MyGame)scene.Game;
            m_game.EnvironmentChanged += Data_MapChanged;

            viewGridProvider.ViewGridCornerChanged += OnViewGridCornerChanged;

            m_cameraPos = m_camera.Position;
            m_cameraLook = m_camera.Look;
            m_cameraChunkPos = (m_cameraPos / Chunk.CHUNK_SIZE).ToFloorIntVector3();

            m_forceNearListUpdate = true;
            m_forceDrawListUpdate = true;
        }
        public ChunkManager(TerrainRenderer scene, Camera camera, ViewGridProvider viewGridProvider)
        {
            m_scene            = scene;
            m_camera           = camera;
            m_viewGridProvider = viewGridProvider;

            // XXX
            m_game = (MyGame)scene.Game;
            m_game.EnvironmentChanged += Data_MapChanged;

            viewGridProvider.ViewGridCornerChanged += OnViewGridCornerChanged;

            m_cameraPos      = m_camera.Position;
            m_cameraLook     = m_camera.Look;
            m_cameraChunkPos = (m_cameraPos / Chunk.CHUNK_SIZE).ToFloorIntVector3();

            m_forceNearListUpdate = true;
            m_forceDrawListUpdate = true;
        }