Beispiel #1
0
        // Factory functions
        public static PolygonPath CreateEmpty(GameObjectItem go)
        {
            var polygon = new PolygonPath(go);

            polygon.gameObject = go;
            polygon.layer      = go.layer;

            return(polygon);
        }
Beispiel #2
0
 public override object ConvertTo(ITypeDescriptorContext context,
                                  System.Globalization.CultureInfo culture,
                                  object value, Type destType)
 {
     if (destType == typeof(string) && value is PolygonPath)
     {
         PolygonPath polygonPath = (PolygonPath)value;
         return(string.Format("Vertices: {0}", polygonPath.WorldPoints == null ? 0 : polygonPath.WorldPoints.Length));
     }
     return(base.ConvertTo(context, culture, value, destType));
 }