Example #1
0
 public FootholdLine(Board board, MapleDot firstDot)
     : base(board, firstDot)
 {
     this._cantThrough = null;
     this._forbidFallDown = null;
     this._piece = null;
     this._force = null;
 }
Example #2
0
 public FootholdLine(Board board, MapleDot firstDot, MapleBool forbidFallDown, MapleBool cantThrough, int? piece, int? force)
     : base(board, firstDot)
 {
     this._cantThrough = cantThrough;
     this._forbidFallDown = forbidFallDown;
     this._piece = piece;
     this._force = force;
 }
Example #3
0
 public MapleLine(Board board, MapleDot firstDot)
 {
     this.board = board;
     this.firstDot = firstDot;
     this.firstDot.connectedLines.Add(this);
     this.secondDot = board.Mouse;
     this.secondDot.connectedLines.Add(this);
     this.beforeConnecting = true;
     firstDot.PointMoved += OnFirstDotMoved;
 }
Example #4
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;
        }
        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;
            }
        }
Example #6
0
 public RopeLine(Board board, MapleDot firstDot)
     : base(board, firstDot)
 {
     xBind = true;
 }
Example #7
0
 public MinimapLine(Board board, MapleDot firstDot, MapleDot secondDot)
     : base(board, firstDot, secondDot)
 {
 }
Example #8
0
 public override MapleLine CreateLine(MapleDot a, MapleDot b)
 {
     return new ToolTipLine(board, a, b);
 }
Example #9
0
 public ToolTipLine(Board board, MapleDot firstDot, MapleDot secondDot)
     : base(board, firstDot, secondDot)
 {
 }
Example #10
0
 public static UndoRedoAction LineAdded(MapleLine line, MapleDot a, MapleDot b)
 {
     return new UndoRedoAction(null, UndoRedoType.LineAdded, a, b, line);
 }
 public static UndoRedoAction LineAdded(MapleLine line, MapleDot a, MapleDot b)
 {
     return(new UndoRedoAction(null, UndoRedoType.LineAdded, a, b, line));
 }
Example #12
0
 public MapleDot GetOtherDot(MapleDot x)
 {
     if (firstDot == x)
         return secondDot;
     else if (secondDot == x)
         return firstDot;
     else
         throw new Exception("GetOtherDot: line is not properly connected");
 }
Example #13
0
 public abstract MapleLine CreateLine(MapleDot a, MapleDot b);
Example #14
0
 public override MapleLine CreateLine(MapleDot a, MapleDot b)
 {
     return(new MiscLine(board, a, b));
 }
Example #15
0
 public override MapleLine CreateLine(MapleDot a, MapleDot b)
 {
     return new MinimapLine(board, a, b);
 }
Example #16
0
 public MiscLine(Board board, MapleDot firstDot, MapleDot secondDot)
     : base(board, firstDot, secondDot)
 {
 }
Example #17
0
 public void ConnectSecondDot(MapleDot secondDot)
 {
     if (!beforeConnecting) return;
     this.secondDot.connectedLines.Clear();
     this.secondDot = secondDot;
     this.secondDot.connectedLines.Add(this);
     secondDot.PointMoved += OnSecondDotMoved;
 }