Exemple #1
0
        public static LW_Polyline2D Create(Vector3[] points, bool isClosed = false)
        {
            LW_Polyline2D instance = CreateInstance <LW_Polyline2D>();

            instance.Set(points, isClosed);
            return(instance);
        }
Exemple #2
0
        public override LW_Polyline2D ConvertToPolyline2D()
        {
            LW_Polyline2D polyline = CreateInstance <LW_Polyline2D>();

            if (m_Points != null && m_Points.Count > 1)
            {
                Vector2[] polylinePoints = new Vector2[m_Points.Count];
                for (int i = 0; i < m_Points.Count; i++)
                {
                    polylinePoints[i] = m_Points[i].position;
                }
                polyline.Set(polylinePoints, m_IsClosed);
            }
            return(polyline);
        }