コード例 #1
0
ファイル: PolygonPath.cs プロジェクト: SwamyDev/dogma-engine
        // Factory functions
        public static PolygonPath CreateEmpty(GameObjectItem go)
        {
            var polygon = new PolygonPath(go);

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

            return(polygon);
        }
コード例 #2
0
ファイル: PolygonPath.cs プロジェクト: SwamyDev/dogma-engine
 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));
 }