Exemplo n.º 1
0
        public static PolygonSaveList FromFile(string fileName)
        {
            PolygonSaveList polygonSaveList =
                FileManager.XmlDeserialize <PolygonSaveList>(fileName);

            polygonSaveList.mFileName = fileName;

            return(polygonSaveList);
        }
Exemplo n.º 2
0
        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);
        }