Example #1
0
 public static TmxObjectType FromXml(XElement xml)
 {
     return(new TmxObjectType
     {
         Name = TmxHelper.GetAttributeAsString(xml, "name", ""),
         Color = TmxHelper.GetAttributeAsColor(xml, "color", new Color32(128, 128, 128, 255)),
         Properties = TmxObjectTypeProperty.FromObjectTypeXml(xml)
     });
 }
Example #2
0
        public static TmxObjectType FromXml(XElement xml)
        {
            TmxObjectType tmxObjectType = new TmxObjectType();

            tmxObjectType.Name       = TmxHelper.GetAttributeAsString(xml, "name", "");
            tmxObjectType.Color      = TmxHelper.GetAttributeAsColor(xml, "color", Color.Gray);
            tmxObjectType.Properties = TmxObjectTypeProperty.FromObjectTypeXml(xml);

            return(tmxObjectType);
        }