Beispiel #1
0
 public BodyProperties(
     DynamicBodyProperties dynamicBodyProperties,
     StaticBodyProperties staticBodyProperties)
 {
     this._dynamicBodyProperties = dynamicBodyProperties;
     this._staticBodyProperties  = staticBodyProperties;
 }
Beispiel #2
0
        public static bool FromXmlNode(XmlNode node, out BodyProperties bodyProperties)
        {
            XmlAttributeCollection attributes = node.Attributes;
            float result1;
            float result2;
            float result3;
            DynamicBodyProperties dynamicBodyProperties = (attributes != null ? (attributes.Count == 5 ? 1 : 0) : 0) == 0 || node.Attributes["age"].Value == null || (node.Attributes["weight"].Value == null || node.Attributes["build"].Value == null) ? new DynamicBodyProperties() : (!float.TryParse(node.Attributes["age"].Value, out result1) || !float.TryParse(node.Attributes["weight"].Value, out result2) || !float.TryParse(node.Attributes["build"].Value, out result3) ? new DynamicBodyProperties() : new DynamicBodyProperties(result1, result2, result3));
            StaticBodyProperties  staticBodyProperties;

            if (StaticBodyProperties.FromXmlNode(node, out staticBodyProperties))
            {
                bodyProperties = new BodyProperties(dynamicBodyProperties, staticBodyProperties);
                return(true);
            }
            bodyProperties = new BodyProperties();
            return(false);
        }
Beispiel #3
0
 public bool Equals(DynamicBodyProperties other) => this.Age.Equals(other.Age) && this.Weight.Equals(other.Weight) && this.Build.Equals(other.Build);