From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Scripts/XMainClient/KKSG/RiskOneMapInfo.cs | 214 +++++++++++++++++++++ 1 file changed, 214 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/RiskOneMapInfo.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/RiskOneMapInfo.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/RiskOneMapInfo.cs b/Client/Assets/Scripts/XMainClient/KKSG/RiskOneMapInfo.cs new file mode 100644 index 00000000..8d8d707a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/RiskOneMapInfo.cs @@ -0,0 +1,214 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "RiskOneMapInfo")] + [Serializable] + public class RiskOneMapInfo : IExtensible + { + [ProtoMember(1, Name = "grids", DataFormat = DataFormat.Default)] + public List grids + { + get + { + return this._grids; + } + } + + [ProtoMember(2, IsRequired = false, Name = "curX", DataFormat = DataFormat.TwosComplement)] + public int curX + { + get + { + return this._curX ?? 0; + } + set + { + this._curX = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool curXSpecified + { + get + { + return this._curX != null; + } + set + { + bool flag = value == (this._curX == null); + if (flag) + { + this._curX = (value ? new int?(this.curX) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "curY", DataFormat = DataFormat.TwosComplement)] + public int curY + { + get + { + return this._curY ?? 0; + } + set + { + this._curY = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool curYSpecified + { + get + { + return this._curY != null; + } + set + { + bool flag = value == (this._curY == null); + if (flag) + { + this._curY = (value ? new int?(this.curY) : null); + } + } + } + + [ProtoMember(4, Name = "boxInfos", DataFormat = DataFormat.Default)] + public List boxInfos + { + get + { + return this._boxInfos; + } + } + + [ProtoMember(5, IsRequired = false, Name = "mapid", DataFormat = DataFormat.TwosComplement)] + public int mapid + { + get + { + return this._mapid ?? 0; + } + set + { + this._mapid = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool mapidSpecified + { + get + { + return this._mapid != null; + } + set + { + bool flag = value == (this._mapid == null); + if (flag) + { + this._mapid = (value ? new int?(this.mapid) : null); + } + } + } + + [ProtoMember(6, IsRequired = false, Name = "moveDirection", DataFormat = DataFormat.TwosComplement)] + public int moveDirection + { + get + { + return this._moveDirection ?? 0; + } + set + { + this._moveDirection = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool moveDirectionSpecified + { + get + { + return this._moveDirection != null; + } + set + { + bool flag = value == (this._moveDirection == null); + if (flag) + { + this._moveDirection = (value ? new int?(this.moveDirection) : null); + } + } + } + + private readonly List _grids = new List(); + + private int? _curX; + + private int? _curY; + + private readonly List _boxInfos = new List(); + + private int? _mapid; + + private int? _moveDirection; + + private IExtension extensionObject; + + private bool ShouldSerializecurX() + { + return this.curXSpecified; + } + + private void ResetcurX() + { + this.curXSpecified = false; + } + + private bool ShouldSerializecurY() + { + return this.curYSpecified; + } + + private void ResetcurY() + { + this.curYSpecified = false; + } + + private bool ShouldSerializemapid() + { + return this.mapidSpecified; + } + + private void Resetmapid() + { + this.mapidSpecified = false; + } + + private bool ShouldSerializemoveDirection() + { + return this.moveDirectionSpecified; + } + + private void ResetmoveDirection() + { + this.moveDirectionSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0