Exemple #1
0
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("_normalsSmoothLvl", _normalsSmoothLvl);
            info.AddValue("_terrainMaterial", _terrainMaterial, typeof(MistComponent));
            info.AddValue("_terrainMaterial", _terrainMaterial, typeof(Material));

            string pathTexR        = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_textureR);
            string pathTexG        = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_textureR);
            string pathTexB        = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_textureR);
            string pathTexBlack    = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_textureR);
            string pathTexBlendMap = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_textureR);

            info.AddValue("pathTexR", pathTexR);
            info.AddValue("pathTexG", pathTexG);
            info.AddValue("pathTexB", pathTexB);
            info.AddValue("pathTexBlack", pathTexBlack);
            info.AddValue("pathTexBlendMap", pathTexBlendMap);
            info.AddValue("m_heightMapTexPath", m_heightMapTexPath);
            info.AddValue("MapSize", MapSize);
            info.AddValue("MaximumHeight", MaximumHeight);

            // normal map red channel
            bool bNormalR = _normalMapR != null;

            info.AddValue("bNormalR", bNormalR);
            if (bNormalR)
            {
                string pathTexNormalMapR = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_normalMapR);
                info.AddValue("pathTexNormalMapR", pathTexNormalMapR);
            }
            // normal map green channel
            bool bNormalG = _normalMapG != null;

            info.AddValue("bNormalG", bNormalG);
            if (bNormalG)
            {
                string pathTexNormalMapG = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_normalMapG);
                info.AddValue("pathTexNormalMapG", pathTexNormalMapG);
            }

            // normal map blue channel
            bool bNormalB = _normalMapB != null;

            info.AddValue("bNormalB", bNormalB);
            if (bNormalB)
            {
                string pathTexNormalMapB = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_normalMapB);
                info.AddValue("pathTexNormalMapB", pathTexNormalMapB);
            }

            // normal map black channel
            bool bNormalBlack = _normalMapBlack != null;

            info.AddValue("bNormalBlack", bNormalBlack);
            if (bNormalBlack)
            {
                string pathTexNormalMapBlack = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(_normalMapBlack);
                info.AddValue("pathTexNormalMapBlack", pathTexNormalMapBlack);
            }
        }
Exemple #2
0
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            string dayTexturesPath   = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_skyboxDayTexture);
            string nightTexturesPath = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_skyboxNightTexture);

            info.AddValue("m_skyboxDayTexture", dayTexturesPath);
            info.AddValue("m_skyboxNightTexture", nightTexturesPath);
            info.AddValue("FloatSpeed", FloatSpeed);
        }
Exemple #3
0
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            string pathToTexture1 = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_texture1);
            string pathToTexture2 = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_texture2);

            info.AddValue("pathToTexture1", pathToTexture1);
            info.AddValue("pathToTexture2", pathToTexture2);
            info.AddValue("lensFlareSunSize", LENS_FLARE_SUN_SIZE);
            info.AddValue("sunSize", SUN_SIZE);
            info.AddValue("lensFlareSizeToSunSize", LENS_FLARE_SIZE_TO_SUN_SIZE);
        }
        public override void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            base.GetObjectData(info, context);

            var texturePath     = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_texture);
            var normalTexPath   = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_normalMap);
            var specularTexPath = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_specularMap);
            var skinPath        = PoolProxy.GetResourceKey <ObtainModelPool, string, Skin>(m_skin);

            info.AddValue("albedo", texturePath);
            info.AddValue("normalMap", normalTexPath);
            info.AddValue("specularMap", specularTexPath);
            info.AddValue("skin", skinPath);
            info.AddValue("material", m_material, typeof(Material));
            info.AddValue("mistComponent", m_mist, typeof(MistComponent));
        }
        public void GetObjectData(SerializationInfo info, StreamingContext context)
        {
            info.AddValue("m_transparencyDepth", m_transparencyDepth);
            info.AddValue("m_waveSpeed", m_waveSpeed);
            info.AddValue("m_waveStrength", m_waveStrength);
            info.AddValue("m_moveFactor", m_moveFactor);
            info.AddValue("m_modelMatrix", m_modelMatrix, typeof(Matrix4));
            info.AddValue("m_translation", m_translation, typeof(Vector3));
            info.AddValue("m_rotation", m_rotation, typeof(Vector3));
            info.AddValue("m_scaling", m_scaling, typeof(Vector3));
            info.AddValue("Quality", Quality, typeof(WaterQuality));
            info.AddValue("m_frustumSquares", m_frustumSquares);

            string distortionMapTexPath = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_waterDistortionMap);
            string normalMapTexPath     = PoolProxy.GetResourceKey <ObtainTexturePool, string, ITexture>(m_waterNormalMap);

            info.AddValue("m_waterDistortionMap", distortionMapTexPath);
            info.AddValue("m_waterNormalMap", normalMapTexPath);
        }