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/MapIntItem.cs | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/MapIntItem.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/MapIntItem.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/MapIntItem.cs b/Client/Assets/Scripts/XMainClient/KKSG/MapIntItem.cs new file mode 100644 index 00000000..e3cd150d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/MapIntItem.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "MapIntItem")] + [Serializable] + public class MapIntItem : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "key", DataFormat = DataFormat.TwosComplement)] + public ulong key + { + get + { + return this._key ?? 0UL; + } + set + { + this._key = new ulong?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool keySpecified + { + get + { + return this._key != null; + } + set + { + bool flag = value == (this._key == null); + if (flag) + { + this._key = (value ? new ulong?(this.key) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "value", DataFormat = DataFormat.TwosComplement)] + public uint value + { + get + { + return this._value ?? 0u; + } + set + { + this._value = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool valueSpecified + { + get + { + return this._value != null; + } + set + { + bool flag = value == (this._value == null); + if (flag) + { + this._value = (value ? new uint?(this.value) : null); + } + } + } + + private ulong? _key; + + private uint? _value; + + private IExtension extensionObject; + + private bool ShouldSerializekey() + { + return this.keySpecified; + } + + private void Resetkey() + { + this.keySpecified = false; + } + + private bool ShouldSerializevalue() + { + return this.valueSpecified; + } + + private void Resetvalue() + { + this.valueSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0