public void Serialize(XmlWriter writer)
        {
            writer.WriteStartElement("ParticleGeneration");
            writer.WriteAttributeString("Name", Name);
            writer.WriteAttributeString("Version", Version.ToString(CultureInfo.InvariantCulture));
            writer.WriteElementString("GenerationType", "GPU");

            writer.WriteStartElement("Properties");

            foreach (IMyConstProperty property in m_properties)
            {
                writer.WriteStartElement("Property");

                writer.WriteAttributeString("Name", property.Name);

                writer.WriteAttributeString("Type", property.BaseValueType);

                PropertyAnimationType animType = PropertyAnimationType.Const;
                if (property.Animated)
                {
                    animType = property.Is2D ? PropertyAnimationType.Animated2D : PropertyAnimationType.Animated;
                }
                writer.WriteAttributeString("AnimationType", animType.ToString());

                property.Serialize(writer);

                writer.WriteEndElement(); //property
            }
            writer.WriteEndElement();     //properties

            writer.WriteEndElement();     //ParticleGeneration
        }
        public CssPropertyAnimationBuilder AnimationType(PropertyAnimationType animatedProperty)
        {
            effect.Animations = new List <PropertyAnimationType> {
                animatedProperty
            };

            return(this);
        }
 public PropertyAnimation(PropertyAnimationType value)
     : this()
 {
     AnimationType = value;
 }
        public CssPropertyAnimationBuilder AnimationType(PropertyAnimationType animatedProperty)
        {
            effect.Animations = new List<PropertyAnimationType> { animatedProperty };

            return this;
        }
Пример #5
0
 public PropertyAnimation(PropertyAnimationType value) : this()
 {
     AnimationType = value;
 }