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/TowerResult.cs | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/TowerResult.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/TowerResult.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/TowerResult.cs b/Client/Assets/Scripts/XMainClient/KKSG/TowerResult.cs new file mode 100644 index 00000000..31d45adb --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/TowerResult.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "TowerResult")] + [Serializable] + public class TowerResult : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "isNewRecord", DataFormat = DataFormat.Default)] + public bool isNewRecord + { + get + { + return this._isNewRecord ?? false; + } + set + { + this._isNewRecord = new bool?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool isNewRecordSpecified + { + get + { + return this._isNewRecord != null; + } + set + { + bool flag = value == (this._isNewRecord == null); + if (flag) + { + this._isNewRecord = (value ? new bool?(this.isNewRecord) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "towerFloor", DataFormat = DataFormat.TwosComplement)] + public int towerFloor + { + get + { + return this._towerFloor ?? 0; + } + set + { + this._towerFloor = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool towerFloorSpecified + { + get + { + return this._towerFloor != null; + } + set + { + bool flag = value == (this._towerFloor == null); + if (flag) + { + this._towerFloor = (value ? new int?(this.towerFloor) : null); + } + } + } + + private bool? _isNewRecord; + + private int? _towerFloor; + + private IExtension extensionObject; + + private bool ShouldSerializeisNewRecord() + { + return this.isNewRecordSpecified; + } + + private void ResetisNewRecord() + { + this.isNewRecordSpecified = false; + } + + private bool ShouldSerializetowerFloor() + { + return this.towerFloorSpecified; + } + + private void ResettowerFloor() + { + this.towerFloorSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0