Exemplo n.º 1
0
        public MapleRectangle(Board board, SerializationForm json)
            : base(board, 0, 0, 0)
        {
            // Make dots
            a = CreateDot(json.x1, json.y1);
            b = CreateDot(json.x2, json.y1);
            c = CreateDot(json.x2, json.y2);
            d = CreateDot(json.x1, json.y2);

            // Make lines
            ab       = CreateLine(a, b);
            bc       = CreateLine(b, c);
            cd       = CreateLine(c, d);
            da       = CreateLine(d, a);
            ab.yBind = true;
            bc.xBind = true;
            cd.yBind = true;
            da.xBind = true;
        }
Exemplo n.º 2
0
        public MapleRectangle(Board board, XNA.Rectangle rect)
            : base(board, 0, 0, 0) // BoardItem position doesn't do anything in rectangles
        {
            lock (board.ParentControl)
            {
                // Make dots
                a = CreateDot(rect.Left, rect.Top);
                b = CreateDot(rect.Right, rect.Top);
                c = CreateDot(rect.Right, rect.Bottom);
                d = CreateDot(rect.Left, rect.Bottom);
                PlaceDots();

                // Make lines
                ab       = CreateLine(a, b);
                bc       = CreateLine(b, c);
                cd       = CreateLine(c, d);
                da       = CreateLine(d, a);
                ab.yBind = true;
                bc.xBind = true;
                cd.yBind = true;
                da.xBind = true;
            }
        }
Exemplo n.º 3
0
        public MapleEmptyRectangle(Board board, XNA.Rectangle rect)
        {
            this.board = board;

            lock (board.ParentControl)
            {
                a = CreateDot(rect.Left, rect.Top);
                b = CreateDot(rect.Right, rect.Top);
                c = CreateDot(rect.Right, rect.Bottom);
                d = CreateDot(rect.Left, rect.Bottom);
                PlaceDots();

                // Make lines
                ab       = CreateLine(a, b);
                bc       = CreateLine(b, c);
                cd       = CreateLine(c, d);
                da       = CreateLine(d, a);
                ab.yBind = true;
                bc.xBind = true;
                cd.yBind = true;
                da.xBind = true;
            }
        }
Exemplo n.º 4
0
 public VRLine(Board board, MapleDot firstDot, MapleDot secondDot)
     : base(board, firstDot, secondDot)
 {
 }
Exemplo n.º 5
0
 public override MapleLine CreateLine(MapleDot a, MapleDot b)
 {
     return(new ToolTipLine(board, a, b));
 }
Exemplo n.º 6
0
 public abstract MapleLine CreateLine(MapleDot a, MapleDot b);
Exemplo n.º 7
0
 public RopeLine(Board board, MapleDot firstDot)
     : base(board, firstDot)
 {
     xBind = true;
 }