FromPolygon() public static method

public static FromPolygon ( FlatRedBall polygon ) : PolygonSave
polygon FlatRedBall
return PolygonSave
Exemplo n.º 1
0
 public void AddPolygonList(PositionedObjectList <FlatRedBall.Math.Geometry.Polygon> polygonsToAdd)
 {
     foreach (FlatRedBall.Math.Geometry.Polygon polygon in polygonsToAdd)
     {
         PolygonSave polygonSave = PolygonSave.FromPolygon(polygon);
         PolygonSaves.Add(polygonSave);
     }
 }
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);
        }