Example #1
0
        public static String produceMapPoint(Point s,Point e,int count,String cardIndex,int beginCardNumber)
        {
            Console.WriteLine("produceMapPoint");
            MapPointList mapPointss = new MapPointList();

            double sss = ((double)2 / (double)100);
            debug("sss = " + sss);

            debug("e.x = "+e.X+"e.y"+e.Y);
            debug("s.x = " + s.X + "s.y" + s.Y);
            double xstep = (((double)e.X - (double)s.X) / count);
            debug("xstep = " + xstep);
            double ystep = (((double)e.Y - (double)s.Y) / count);
            debug("ystep = " + ystep);
            for (int i = 0; i < count;i++)
            {
                MapPoints mapPoint = new MapPoints();
                //debug("xstep * count = " + xstep * i);

                mapPoint.x = (int)(s.X + xstep * i);
                mapPoint.y = (int)(s.Y + ystep * i);
                mapPointss.add(cardIndex + "" + (beginCardNumber + i), mapPoint);

                /*mapPoint.id = cardIndex + "" + (beginCardNumber + i);

                debug("i = "+i+"  x = " + mapPoint.point.X + " y = " + mapPoint.point.Y);
                list.add(mapPoint);*/
                //setProgressBar1();

            }
            string output = ConvertJsonString(JsonConvert.SerializeObject(mapPointss));

            Console.WriteLine(output);

            return output;
        }
Example #2
0
    public static void Open(MapPointList content)
    {
        MapPointEditorWindow window = GetWindow <MapPointEditorWindow>("Map Points Editor");

        window.my = content;
    }