Пример #1
0
        public override MyHeightCubemap GetHeightmap()
        {
            MyHeightCubemap          heightMap;
            MyHeightMapLoadingSystem component = MySession.Static.GetComponent <MyHeightMapLoadingSystem>();

            if (component == null)
            {
                return(this.GetHeightMap(this.m_path, this.m_mod));
            }
            if (!component.TryGet(this.m_path, out heightMap))
            {
                heightMap = this.GetHeightMap(this.m_path, this.m_mod);
                component.Cache(this.m_path, ref heightMap);
            }
            return(heightMap);
        }
Пример #2
0
        public override MyCubemap[] GetMaps(MyPlanetMapTypeSet types)
        {
            MyCubemap[] cubemapArray;
            MyHeightMapLoadingSystem component = MySession.Static.GetComponent <MyHeightMapLoadingSystem>();

            if (component == null)
            {
                this.GetPlanetMaps(this.m_path, this.m_mod, types, out cubemapArray);
            }
            else if (!component.TryGet(this.m_path, out cubemapArray))
            {
                this.GetPlanetMaps(this.m_path, this.m_mod, types, out cubemapArray);
                component.Cache(this.m_path, ref cubemapArray);
            }
            return(cubemapArray);
        }