From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../Assets/Scripts/XMainClient/KKSG/RiskBoxInfo.cs | 207 +++++++++++++++++++++ 1 file changed, 207 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/RiskBoxInfo.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/RiskBoxInfo.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/RiskBoxInfo.cs b/Client/Assets/Scripts/XMainClient/KKSG/RiskBoxInfo.cs new file mode 100644 index 00000000..a2b49a0a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/RiskBoxInfo.cs @@ -0,0 +1,207 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "RiskBoxInfo")] + [Serializable] + public class RiskBoxInfo : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "state", DataFormat = DataFormat.TwosComplement)] + public RiskBoxState state + { + get + { + return this._state ?? RiskBoxState.RISK_BOX_LOCKED; + } + set + { + this._state = new RiskBoxState?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool stateSpecified + { + get + { + return this._state != null; + } + set + { + bool flag = value == (this._state == null); + if (flag) + { + this._state = (value ? new RiskBoxState?(this.state) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "leftTime", DataFormat = DataFormat.TwosComplement)] + public int leftTime + { + get + { + return this._leftTime ?? 0; + } + set + { + this._leftTime = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool leftTimeSpecified + { + get + { + return this._leftTime != null; + } + set + { + bool flag = value == (this._leftTime == null); + if (flag) + { + this._leftTime = (value ? new int?(this.leftTime) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "item", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public ItemBrief item + { + get + { + return this._item; + } + set + { + this._item = value; + } + } + + [ProtoMember(4, IsRequired = false, Name = "beginTime", DataFormat = DataFormat.TwosComplement)] + public int beginTime + { + get + { + return this._beginTime ?? 0; + } + set + { + this._beginTime = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool beginTimeSpecified + { + get + { + return this._beginTime != null; + } + set + { + bool flag = value == (this._beginTime == null); + if (flag) + { + this._beginTime = (value ? new int?(this.beginTime) : null); + } + } + } + + [ProtoMember(5, IsRequired = false, Name = "slot", DataFormat = DataFormat.TwosComplement)] + public int slot + { + get + { + return this._slot ?? 0; + } + set + { + this._slot = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool slotSpecified + { + get + { + return this._slot != null; + } + set + { + bool flag = value == (this._slot == null); + if (flag) + { + this._slot = (value ? new int?(this.slot) : null); + } + } + } + + private RiskBoxState? _state; + + private int? _leftTime; + + private ItemBrief _item = null; + + private int? _beginTime; + + private int? _slot; + + private IExtension extensionObject; + + private bool ShouldSerializestate() + { + return this.stateSpecified; + } + + private void Resetstate() + { + this.stateSpecified = false; + } + + private bool ShouldSerializeleftTime() + { + return this.leftTimeSpecified; + } + + private void ResetleftTime() + { + this.leftTimeSpecified = false; + } + + private bool ShouldSerializebeginTime() + { + return this.beginTimeSpecified; + } + + private void ResetbeginTime() + { + this.beginTimeSpecified = false; + } + + private bool ShouldSerializeslot() + { + return this.slotSpecified; + } + + private void Resetslot() + { + this.slotSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0