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/PkRankExtraData.cs | 148 +++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/PkRankExtraData.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/PkRankExtraData.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/PkRankExtraData.cs b/Client/Assets/Scripts/XMainClient/KKSG/PkRankExtraData.cs new file mode 100644 index 00000000..79acafad --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/PkRankExtraData.cs @@ -0,0 +1,148 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "PkRankExtraData")] + [Serializable] + public class PkRankExtraData : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "joincount", DataFormat = DataFormat.TwosComplement)] + public uint joincount + { + get + { + return this._joincount ?? 0u; + } + set + { + this._joincount = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool joincountSpecified + { + get + { + return this._joincount != null; + } + set + { + bool flag = value == (this._joincount == null); + if (flag) + { + this._joincount = (value ? new uint?(this.joincount) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "winrate", DataFormat = DataFormat.FixedSize)] + public float winrate + { + get + { + return this._winrate ?? 0f; + } + set + { + this._winrate = new float?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool winrateSpecified + { + get + { + return this._winrate != null; + } + set + { + bool flag = value == (this._winrate == null); + if (flag) + { + this._winrate = (value ? new float?(this.winrate) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "continuewin", DataFormat = DataFormat.TwosComplement)] + public uint continuewin + { + get + { + return this._continuewin ?? 0u; + } + set + { + this._continuewin = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool continuewinSpecified + { + get + { + return this._continuewin != null; + } + set + { + bool flag = value == (this._continuewin == null); + if (flag) + { + this._continuewin = (value ? new uint?(this.continuewin) : null); + } + } + } + + private uint? _joincount; + + private float? _winrate; + + private uint? _continuewin; + + private IExtension extensionObject; + + private bool ShouldSerializejoincount() + { + return this.joincountSpecified; + } + + private void Resetjoincount() + { + this.joincountSpecified = false; + } + + private bool ShouldSerializewinrate() + { + return this.winrateSpecified; + } + + private void Resetwinrate() + { + this.winrateSpecified = false; + } + + private bool ShouldSerializecontinuewin() + { + return this.continuewinSpecified; + } + + private void Resetcontinuewin() + { + this.continuewinSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0