public static PolygonSaveList FromFile(string fileName) { PolygonSaveList polygonSaveList = FileManager.XmlDeserialize <PolygonSaveList>(fileName); polygonSaveList.mFileName = fileName; return(polygonSaveList); }
public static PolygonSaveList FromRuntime <T>(IList <T> polygonList) where T : FlatRedBall.Math.Geometry.Polygon { PolygonSaveList psl = new PolygonSaveList(); for (int i = 0; i < polygonList.Count; i++) { if (polygonList[i] != null) { psl.PolygonSaves.Add(PolygonSave.FromPolygon(polygonList[i])); } else { psl.PolygonSaves.Add(null); } } return(psl); }
public override TImport Import(string filename, ContentImporterContext context) { PolygonSaveList polygonSaveList = PolygonSaveList.FromFile(filename); return(polygonSaveList); }