Пример #1
0
 public LifeInstance(MapleDrawableInfo baseInfo, Board board, int x, int y, int rx0Shift, int rx1Shift, int yShift, string limitedname, int? mobTime, MapleBool flip, MapleBool hide, int? info, int? team)
     : base(board, x, y, -1)
 {
     this.limitedname = limitedname;
     this._rx0Shift = rx0Shift;
     this._rx1Shift = rx1Shift;
     this._yShift = yShift;
     this.mobTime = mobTime;
     this.info = info;
     this.team = team;
     this.flip = flip;
     if (flip == true)
     {
         // We need to use the data from baseInfo directly because BaseInfo property is only instantiated in the child ctor,
         // which will execute after we are finished.
         X -= baseInfo.Width - 2 * baseInfo.Origin.X;
     }
 }
Пример #2
0
 public void SetHeldInfo(MapleDrawableInfo newInfo)
 {
     lock (Board.ParentControl)
     {
         Clear();
         if (newInfo.Image == null)
             ((MapleExtractableInfo)newInfo).ParseImage();
         currAddedInfo = newInfo;
         currAddedObj = newInfo.CreateInstance(Board.SelectedLayer, Board, X + currAddedInfo.Origin.X - newInfo.Image.Width / 2, Y + currAddedInfo.Origin.Y - newInfo.Image.Height / 2, 50, false);
         Board.BoardItems.Add(currAddedObj, false);
         BindItem(currAddedObj, new Microsoft.Xna.Framework.Point(newInfo.Origin.X - newInfo.Image.Width / 2, newInfo.Origin.Y - newInfo.Image.Height / 2));
         state = MouseState.StaticObjectAdding;
     }
 }
Пример #3
0
 public void SelectionMode()
 {
     lock (Board.ParentControl)
     {
         Clear();
         currAddedInfo = null;
         tileRandomList = null;
         state = MouseState.Selection;
     }
 }