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/RiskMapInfos.cs | 128 +++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/RiskMapInfos.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/RiskMapInfos.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/RiskMapInfos.cs b/Client/Assets/Scripts/XMainClient/KKSG/RiskMapInfos.cs new file mode 100644 index 00000000..b604856e --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/RiskMapInfos.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "RiskMapInfos")] + [Serializable] + public class RiskMapInfos : IExtensible + { + [ProtoMember(1, Name = "infos", DataFormat = DataFormat.Default)] + public List infos + { + get + { + return this._infos; + } + } + + [ProtoMember(2, IsRequired = false, Name = "diceNum", DataFormat = DataFormat.TwosComplement)] + public int diceNum + { + get + { + return this._diceNum ?? 0; + } + set + { + this._diceNum = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool diceNumSpecified + { + get + { + return this._diceNum != null; + } + set + { + bool flag = value == (this._diceNum == null); + if (flag) + { + this._diceNum = (value ? new int?(this.diceNum) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "leftDiceTime", DataFormat = DataFormat.TwosComplement)] + public int leftDiceTime + { + get + { + return this._leftDiceTime ?? 0; + } + set + { + this._leftDiceTime = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool leftDiceTimeSpecified + { + get + { + return this._leftDiceTime != null; + } + set + { + bool flag = value == (this._leftDiceTime == null); + if (flag) + { + this._leftDiceTime = (value ? new int?(this.leftDiceTime) : null); + } + } + } + + [ProtoMember(4, Name = "boxInfos", DataFormat = DataFormat.Default)] + public List boxInfos + { + get + { + return this._boxInfos; + } + } + + private readonly List _infos = new List(); + + private int? _diceNum; + + private int? _leftDiceTime; + + private readonly List _boxInfos = new List(); + + private IExtension extensionObject; + + private bool ShouldSerializediceNum() + { + return this.diceNumSpecified; + } + + private void ResetdiceNum() + { + this.diceNumSpecified = false; + } + + private bool ShouldSerializeleftDiceTime() + { + return this.leftDiceTimeSpecified; + } + + private void ResetleftDiceTime() + { + this.leftDiceTimeSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0