Example #1
0
 public ToolTipInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     title       = json.title;
     desc        = json.desc;
     originalNum = json.originalnum;
 }
Example #2
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     result.x1 = Left;
     result.x2 = Right;
     result.y1 = Top;
     result.y2 = Bottom;
 }
Example #3
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.ts = baseInfo.tS;
     result.u  = baseInfo.u;
     result.no = baseInfo.no;
 }
Example #4
0
        public virtual object Serialize()
        {
            SerializationForm result = new SerializationForm();

            UpdateSerializedForm(result);
            return(result);
        }
Example #5
0
 public FootholdAnchor(Board board, SerializationForm json)
     : base(board, json)
 {
     layer = json.layer;
     zm    = json.zm;
     user  = json.user; // Will be reset to true on AddToBoard if we are copypasting
 }
Example #6
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.layer = layer;
     result.zm    = zm;
     result.user  = user;
 }
Example #7
0
 public ToolTipInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     title = json.title;
     desc = json.desc;
     originalNum = json.originalnum;
 }
Example #8
0
        public override object Serialize()
        {
            SerializationForm result = new SerializationForm();

            UpdateSerializedForm(result);
            return(result);
        }
Example #9
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.title       = title;
     result.desc        = desc;
     result.originalnum = originalNum;
 }
Example #10
0
 public FootholdAnchor(Board board, SerializationForm json)
     : base(board, json)
 {
     layer = json.layer;
     zm = json.zm;
     user = json.user; // Will be reset to true on AddToBoard if we are copypasting
 }
Example #11
0
 public BuffZone(Board board, SerializationForm json)
     : base(board, json)
 {
     itemID = json.itemid;
     interval = json.interval;
     duration = json.duration;
     zoneName = json.zonename;
 }
Example #12
0
 public FootholdLine(Board board, SerializationForm json)
     : base(board)
 {
     _cantThrough    = json.cantthrough;
     _forbidFallDown = json.forbidfalldown;
     _piece          = json.piece;
     _force          = json.force;
 }
Example #13
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.id          = baseInfo.ID;
     result.reactortime = reactorTime;
     result.flip        = flip;
     result.name        = name;
 }
Example #14
0
 public BuffZone(Board board, SerializationForm json)
     : base(board, json)
 {
     itemID   = json.itemid;
     interval = json.interval;
     duration = json.duration;
     zoneName = json.zonename;
 }
Example #15
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.itemid   = itemID;
     result.interval = interval;
     result.duration = duration;
     result.zonename = zoneName;
 }
Example #16
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.os = baseInfo.oS;
     result.l0 = baseInfo.l0;
     result.l1 = baseInfo.l1;
     result.l2 = baseInfo.l2;
 }
Example #17
0
 public LayeredItem(Board board, SerializationForm json)
     : base(board, json)
 {
     // Layer and zM will not be retained upon copying and pasting, since AddToBoard will set layer & zm itself
     // This feels like the more expected behavior to me. This also simplifies tile copying.
     // If the item is deserialized as part of crash recoverty, AddToBoard will not set the layer & zm, and we will recover correctly
     layer = board.Layers[json.layer];
     zm = json.zm;
 }
Example #18
0
 public LayeredItem(Board board, SerializationForm json)
     : base(board, json)
 {
     // Layer and zM will not be retained upon copying and pasting, since AddToBoard will set layer & zm itself
     // This feels like the more expected behavior to me. This also simplifies tile copying.
     // If the item is deserialized as part of crash recoverty, AddToBoard will not set the layer & zm, and we will recover correctly
     layer = board.Layers[json.layer];
     zm    = json.zm;
 }
Example #19
0
        public object Serialize()
        {
            SerializationForm result = new SerializationForm();

            result.cantthrough    = _cantThrough;
            result.forbidfalldown = _forbidFallDown;
            result.piece          = _piece;
            result.force          = _force;
            return(result);
        }
Example #20
0
 public ShipObject(Board board, SerializationForm json)
     : base(board, json)
 {
     flip     = json.flip;
     x0       = json.x0;
     zVal     = json.zval;
     tMove    = json.tmove;
     shipKind = json.shipkind;
     baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2);
 }
Example #21
0
 public ShipObject(Board board, SerializationForm json)
     : base(board, json)
 {
     flip = json.flip;
     x0 = json.x0;
     zVal = json.zval;
     tMove = json.tmove;
     shipKind = json.shipkind;
     baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2);
 }
Example #22
0
        public object Serialize()
        {
            SerializationForm result = new SerializationForm();

            result.x0 = Left;
            result.y0 = Top;
            result.x1 = Right;
            result.y1 = Bottom;
            return(result);
        }
Example #23
0
 public Healer(Board board, SerializationForm json)
     : base(board, json)
 {
     yMin     = json.ymin;
     yMax     = json.ymax;
     healMin  = json.healmin;
     healMax  = json.healmax;
     fall     = json.fall;
     rise     = json.rise;
     baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2);
 }
Example #24
0
 public Healer(Board board, SerializationForm json)
     : base(board, json)
 {
     yMin = json.ymin;
     yMax = json.ymax;
     healMin = json.healmin;
     healMax = json.healmax;
     fall = json.fall;
     rise = json.rise;
     baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2);
 }
Example #25
0
 public Rope(Board board, SerializationForm json)
 {
     this.board       = board;
     _page            = json.page;
     _ladder          = json.ladder;
     _uf              = json.uf;
     _ladderSetByUser = json.ladderuser;
     firstAnchor      = new RopeAnchor(board, json.x, json.y1, this);
     secondAnchor     = new RopeAnchor(board, json.x, json.y2, this);
     line             = new RopeLine(board, firstAnchor, secondAnchor);
 }
Example #26
0
 public Rope(Board board, SerializationForm json)
 {
     this.board = board;
     _page = json.page;
     _ladder = json.ladder;
     _uf = json.uf;
     _ladderSetByUser = json.ladderuser;
     firstAnchor = new RopeAnchor(board, json.x, json.y1, this);
     secondAnchor = new RopeAnchor(board, json.x, json.y2, this);
     line = new RopeLine(board, firstAnchor, secondAnchor);
 }
Example #27
0
 public LifeInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     _rx0Shift = json.rx0;
     _rx1Shift = json.rx1;
     _yShift = json.yshift;
     mobTime = json.mobtime;
     flip = json.flip;
     hide = json.hide;
     info = json.info;
     team = json.team;
 }
Example #28
0
 public LifeInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     _rx0Shift = json.rx0;
     _rx1Shift = json.rx1;
     _yShift   = json.yshift;
     mobTime   = json.mobtime;
     flip      = json.flip;
     hide      = json.hide;
     info      = json.info;
     team      = json.team;
 }
Example #29
0
        /*public override string ToString()
         * {
         *  return "X: " + x.val.ToString() + ", Y: " + y.val.ToString();
         * }*/
        #endregion

        #region Serialization
        /// <summary>
        /// Constructor
        /// Load from serialized form
        /// </summary>
        /// <param name="board"></param>
        /// <param name="json"></param>
        public MirrorFieldData(Board board, SerializationForm json)
            : base(board, json)
        {
            mirrorFieldDataType = json.mirrorFieldDataType;
            offset         = json.offset;
            reflectionInfo = new ReflectionDrawableBoundary(
                json.reflectionInfo.Gradient,
                json.reflectionInfo.Alpha,
                json.reflectionInfo.ObjectForOverlay,
                json.reflectionInfo.Reflection,
                json.reflectionInfo.AlphaTest);
        }
Example #30
0
 public BackgroundInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     flip = json.flip;
     _a = json.a;
     _cx = json.cx;
     _cy = json.cy;
     _rx = json.rx;
     _ry = json.ry;
     _front = json.front;
     _type = json.type;
     baseInfo = BackgroundInfo.Get(json.bs, json.ani, json.no);
 }
Example #31
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.rx0         = _rx0Shift;
     result.rx1         = _rx1Shift;
     result.yshift      = _yShift;
     result.mobtime     = mobTime;
     result.limitedname = limitedname;
     result.flip        = flip;
     result.hide        = hide;
     result.info        = info;
     result.team        = team;
 }
Example #32
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.os       = baseInfo.oS;
     result.l0       = baseInfo.l0;
     result.l1       = baseInfo.l1;
     result.l2       = baseInfo.l2;
     result.flip     = flip;
     result.x0       = x0;
     result.zval     = zVal;
     result.tmove    = tMove;
     result.shipkind = shipKind;
 }
Example #33
0
 public BackgroundInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     flip     = json.flip;
     _a       = json.a;
     _cx      = json.cx;
     _cy      = json.cy;
     _rx      = json.rx;
     _ry      = json.ry;
     _front   = json.front;
     _type    = json.type;
     baseInfo = BackgroundInfo.Get(json.bs, json.ani, json.no);
 }
Example #34
0
        public virtual object Serialize()
        {
            SerializationForm result = new SerializationForm();

            result.page       = _page;
            result.ladder     = _ladder;
            result.uf         = _uf;
            result.ladderuser = _ladderSetByUser;
            result.x          = firstAnchor.X;
            result.y1         = firstAnchor.Y;
            result.y2         = secondAnchor.Y;
            return(result);
        }
Example #35
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.os      = baseInfo.oS;
     result.l0      = baseInfo.l0;
     result.l1      = baseInfo.l1;
     result.l2      = baseInfo.l2;
     result.ymin    = yMin;
     result.ymax    = yMax;
     result.healmin = healMin;
     result.healmax = healMax;
     result.fall    = fall;
     result.rise    = rise;
 }
Example #36
0
        protected void UpdateSerializedForm(SerializationForm result)
        {
            base.UpdateSerializedForm(result);

            result.mirrorFieldDataType = mirrorFieldDataType;
            result.offset         = offset;
            result.reflectionInfo = new ReflectionDrawableBoundary(
                reflectionInfo.Gradient,
                reflectionInfo.Alpha,
                reflectionInfo.ObjectForOverlay,
                reflectionInfo.Reflection,
                reflectionInfo.AlphaTest
                );
        }
Example #37
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.flip  = flip;
     result.a     = _a;
     result.cx    = _cx;
     result.cy    = _cy;
     result.rx    = _rx;
     result.ry    = _ry;
     result.front = _front;
     result.type  = _type;
     result.bs    = baseInfo.bS;
     result.ani   = baseInfo.ani;
     result.no    = baseInfo.no;
 }
Example #38
0
        public BackgroundInstance(Board board, SerializationForm json)
            : base(board, json)
        {
            flip              = json.flip;
            _a                = json.a;
            _cx               = json.cx;
            _cy               = json.cy;
            _rx               = json.rx;
            _ry               = json.ry;
            _front            = json.front;
            _type             = json.type;
            _screenMode       = json.screenMode;
            _spineAni         = json.spineAni;
            _spineRandomStart = json.spineRandomStart;

            baseInfo = BackgroundInfo.Get(board.ParentControl.GraphicsDevice, json.bs, json.backgroundInfoType, json.no);
        }
Example #39
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.pn       = _pn;
     result.pt       = _pt;
     result.tn       = _tn;
     result.tm       = _tm;
     result.script   = _script;
     result.delay    = _delay;
     result.hidett   = _hideTooltip;
     result.onlyonce = _onlyOnce;
     result.himpact  = _horizontalImpact;
     result.vimpact  = _verticalImpact;
     result.image    = _image;
     result.hrange   = _hRange;
     result.vrange   = _vRange;
 }
Example #40
0
 public PortalInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     _pn = json.pn;
     _pt = json.pt;
     _tn = json.tn;
     _tm = json.tm;
     _script = json.script;
     _delay = json.delay;
     _hideTooltip = json.hidett;
     _onlyOnce = json.onlyonce;
     _horizontalImpact = json.himpact;
     _verticalImpact = json.vimpact;
     _image = json.image;
     _hRange = json.hrange;
     _vRange = json.vrange;
     baseInfo = PortalInfo.GetPortalInfoByType(pt);
 }
Example #41
0
 public ObjectInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2);
     flip = json.flip;
     _r = json.r;
     name = json.name;
     _hide = json.hide;
     _reactor = json.reactor;
     _flow = json.flow;
     _rx = json.rx;
     _ry = json.ry;
     _cx = json.cx;
     _cy = json.cy;
     tags = json.tags;
     if (json.quest != null)
         questInfo = json.quest.ToList();
 }
Example #42
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;
        }
Example #43
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.title = title;
     result.desc = desc;
     result.originalnum = originalNum;
 }
Example #44
0
 public override object Serialize()
 {
     SerializationForm result = new SerializationForm();
     UpdateSerializedForm(result);
     return result;
 }
Example #45
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.os = baseInfo.oS;
     result.l0 = baseInfo.l0;
     result.l1 = baseInfo.l1;
     result.l2 = baseInfo.l2;
     result.flip = flip;
     result.r = _r;
     result.name = name;
     result.hide = _hide;
     result.reactor = _reactor;
     result.flow = _flow;
     result.rx = _rx;
     result.ry = _ry;
     result.cx = _cx;
     result.cy = _cy;
     result.tags = tags;
     result.quest = questInfo == null ? null : questInfo.ToArray();
 }
Example #46
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.os = baseInfo.oS;
     result.l0 = baseInfo.l0;
     result.l1 = baseInfo.l1;
     result.l2 = baseInfo.l2;
 }
Example #47
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.id = baseInfo.ID;
     result.reactortime = reactorTime;
     result.flip = flip;
     result.name = name;
 }
Example #48
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.rx0 = _rx0Shift;
     result.rx1 = _rx1Shift;
     result.yshift = _yShift;
     result.mobtime = mobTime;
     result.limitedname = limitedname;
     result.flip = flip;
     result.hide = hide;
     result.info = info;
     result.team = team;
 }
Example #49
0
 public virtual object Serialize()
 {
     SerializationForm result = new SerializationForm();
     UpdateSerializedForm(result);
     return result;
 }
Example #50
0
 public MobInstance(Board board, SerializationForm json)
     : base(board, json)
 {
     baseInfo = MobInfo.Get(json.id);
 }
Example #51
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.id = baseInfo.ID;
 }
Example #52
0
 public object Serialize()
 {
     SerializationForm result = new SerializationForm();
     result.cantthrough = _cantThrough;
     result.forbidfalldown = _forbidFallDown;
     result.piece = _piece;
     result.force = _force;
     return result;
 }
Example #53
0
 public Pulley(Board board, SerializationForm json)
     : base(board, json)
 {
     baseInfo = ObjectInfo.Get(json.os, json.l0, json.l1, json.l2);
 }
Example #54
0
 public BoardItem(Board board, SerializationForm json)
 {
     this.board = board;
     position = new XNA.Vector3(json.x, json.y, json.z);
 }
Example #55
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.os = baseInfo.oS;
     result.l0 = baseInfo.l0;
     result.l1 = baseInfo.l1;
     result.l2 = baseInfo.l2;
     result.flip = flip;
     result.x0 = x0;
     result.zval = zVal;
     result.tmove = tMove;
     result.shipkind = shipKind;
 }
Example #56
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.layer = layer.LayerNumber;
     result.zm = zm;
 }
Example #57
0
 public SwimArea(Board board, SerializationForm json)
     : base(board, json)
 {
     id = json.id;
 }
Example #58
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     base.UpdateSerializedForm(result);
     result.pn = _pn;
     result.pt = _pt;
     result.tn = _tn;
     result.tm = _tm;
     result.script = _script;
     result.delay = _delay;
     result.hidett = _hideTooltip;
     result.onlyonce = _onlyOnce;
     result.himpact = _horizontalImpact;
     result.vimpact = _verticalImpact;
     result.image = _image;
     result.hrange = _hRange;
     result.vrange = _vRange;
 }
Example #59
0
 public FootholdLine(Board board, SerializationForm json)
     : base(board)
 {
     _cantThrough = json.cantthrough;
     _forbidFallDown = json.forbidfalldown;
     _piece = json.piece;
     _force = json.force;
 }
Example #60
0
 protected void UpdateSerializedForm(SerializationForm result)
 {
     result.x = position.X;
     result.y = position.Y;
     result.z = position.Z;
 }