private static List <XNA.Point> ParsePropToOffsetList(WzImageProperty prop) { List <XNA.Point> result = new List <XNA.Point>(); foreach (WzVectorProperty point in prop.WzProperties) { result.Add(WzInfoTools.VectorToXNAPoint(point)); } return(result); }
private static TileInfo Load(WzCanvasProperty parentObject, string tS, string u, string no, int?mag) { WzImageProperty zProp = parentObject["z"]; int z = zProp == null ? 0 : InfoTool.GetInt(zProp); TileInfo result = new TileInfo(parentObject.PngProperty.GetPNG(false), WzInfoTools.VectorToSystemPoint((WzVectorProperty)parentObject["origin"]), tS, u, no, mag.HasValue ? mag.Value : 1, z, parentObject); WzConvexProperty footholds = (WzConvexProperty)parentObject["foothold"]; if (footholds != null) { foreach (WzVectorProperty foothold in footholds.WzProperties) { result.footholdOffsets.Add(WzInfoTools.VectorToXNAPoint(foothold)); } } if (UserSettings.FixFootholdMispositions) { FixFootholdMispositions(result); } return(result); }