Exemplo n.º 1
0
        protected override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

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

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

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

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

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

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

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

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

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

            ele.TryPathTo("Radiation/Level", true, out subEle);
            subEle.Value = RadiationLevel.ToString("G15");

            ele.TryPathTo("Radiation/DissipationTime", true, out subEle);
            subEle.Value = RadiationDissipationTime.ToString("G15");

            ele.TryPathTo("Radiation/Radius", true, out subEle);
            subEle.Value = RadiationRadius.ToString("G15");

            ele.TryPathTo("SoundLevel", true, out subEle);
            subEle.Value = SoundLevel.ToString();
        }
Exemplo n.º 2
0
        public override void WriteDataXML(XElement ele, ElderScrollsPlugin master)
        {
            XElement subEle;

            if (EditorID != null)
            {
                ele.TryPathTo("EditorID", true, out subEle);
                EditorID.WriteXML(subEle, master);
            }
            if (Model != null)
            {
                ele.TryPathTo("Model", true, out subEle);
                Model.WriteXML(subEle, master);
            }
            if (Data != null)
            {
                ele.TryPathTo("Data", true, out subEle);
                Data.WriteXML(subEle, master);
            }
            if (DecalData != null)
            {
                ele.TryPathTo("DecalData", true, out subEle);
                DecalData.WriteXML(subEle, master);
            }
            if (TextureSet != null)
            {
                ele.TryPathTo("TextureSet", true, out subEle);
                TextureSet.WriteXML(subEle, master);
            }
            if (Sound1 != null)
            {
                ele.TryPathTo("Sound1", true, out subEle);
                Sound1.WriteXML(subEle, master);
            }
            if (Sound2 != null)
            {
                ele.TryPathTo("Sound2", true, out subEle);
                Sound2.WriteXML(subEle, master);
            }
        }