示例#1
0
 public override void Render(StringBuilder sb)
 {
     if (string.IsNullOrWhiteSpace(DEF) && string.IsNullOrWhiteSpace(USE) && DiffuseColor != null)
     {
         DEF = "Mat" + Guid.NewGuid().ToString();
     }
     AddProperty("DEF", DEF);
     AddProperty("USE", USE);
     AddProperty("diffuseColor", Vector3.ToString(DiffuseColor));
     AddProperty("emissiveColor", Vector3.ToString(EmissiveColor));
     AddProperty("specularColor", Vector3.ToString(SpecularColor));
     AddProperty("textureScale", Vector2.ToString(TextureScale));
     AddProperty("transparency", Transparency == null ? null : Transparency.ToString());
     AddProperty("ambientIntensity", AmbientIntensity == null ? null : AmbientIntensity.ToString());
     AddProperty("shininess", Shininess == null ? null : Shininess.ToString());
     AddProperty("occluded", Occluded.ToSlamString());
     base.Render(sb);
 }
示例#2
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            ele.TryPathTo("Width/Min", true, out subEle);
            subEle.Value = MinWidth.ToString("G15");

            ele.TryPathTo("Width/Max", true, out subEle);
            subEle.Value = MaxWidth.ToString("G15");

            ele.TryPathTo("Height/Min", true, out subEle);
            subEle.Value = MinHeight.ToString("G15");

            ele.TryPathTo("Height/Max", true, out subEle);
            subEle.Value = MaxHeight.ToString("G15");

            ele.TryPathTo("Depth", true, out subEle);
            subEle.Value = Depth.ToString("G15");

            ele.TryPathTo("Shininess", true, out subEle);
            subEle.Value = Shininess.ToString("G15");

            ele.TryPathTo("Parallax/Scale", true, out subEle);
            subEle.Value = ParallaxScale.ToString("G15");

            ele.TryPathTo("Parallax/Passes", true, out subEle);
            subEle.Value = ParallaxPasses.ToString();

            ele.TryPathTo("Flags", true, out subEle);
            subEle.Value = DecalFlags.ToString();

            WriteUnusedXML(ele, master);

            ele.TryPathTo("Color", true, out subEle);
            Color.WriteXML(subEle, master);
        }