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/ChangedAttribute.cs | 257 +++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/ChangedAttribute.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/ChangedAttribute.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/ChangedAttribute.cs b/Client/Assets/Scripts/XMainClient/KKSG/ChangedAttribute.cs new file mode 100644 index 00000000..ba0895a4 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/ChangedAttribute.cs @@ -0,0 +1,257 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "ChangedAttribute")] + [Serializable] + public class ChangedAttribute : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "time", DataFormat = DataFormat.TwosComplement)] + public ulong time + { + get + { + return this._time ?? 0UL; + } + set + { + this._time = new ulong?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool timeSpecified + { + get + { + return this._time != null; + } + set + { + bool flag = value == (this._time == null); + if (flag) + { + this._time = (value ? new ulong?(this.time) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "uID", DataFormat = DataFormat.TwosComplement)] + public ulong uID + { + get + { + return this._uID ?? 0UL; + } + set + { + this._uID = new ulong?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool uIDSpecified + { + get + { + return this._uID != null; + } + set + { + bool flag = value == (this._uID == null); + if (flag) + { + this._uID = (value ? new ulong?(this.uID) : null); + } + } + } + + [ProtoMember(3, Name = "AttrID", DataFormat = DataFormat.TwosComplement)] + public List AttrID + { + get + { + return this._AttrID; + } + } + + [ProtoMember(4, Name = "AttrValue", DataFormat = DataFormat.TwosComplement)] + public List AttrValue + { + get + { + return this._AttrValue; + } + } + + [ProtoMember(5, IsRequired = false, Name = "showHUD", DataFormat = DataFormat.Default)] + public bool showHUD + { + get + { + return this._showHUD ?? false; + } + set + { + this._showHUD = new bool?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool showHUDSpecified + { + get + { + return this._showHUD != null; + } + set + { + bool flag = value == (this._showHUD == null); + if (flag) + { + this._showHUD = (value ? new bool?(this.showHUD) : null); + } + } + } + + [ProtoMember(6, IsRequired = false, Name = "needHUD", DataFormat = DataFormat.Default)] + public bool needHUD + { + get + { + return this._needHUD ?? false; + } + set + { + this._needHUD = new bool?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool needHUDSpecified + { + get + { + return this._needHUD != null; + } + set + { + bool flag = value == (this._needHUD == null); + if (flag) + { + this._needHUD = (value ? new bool?(this.needHUD) : null); + } + } + } + + [ProtoMember(7, IsRequired = false, Name = "CasterID", DataFormat = DataFormat.TwosComplement)] + public ulong CasterID + { + get + { + return this._CasterID ?? 0UL; + } + set + { + this._CasterID = new ulong?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool CasterIDSpecified + { + get + { + return this._CasterID != null; + } + set + { + bool flag = value == (this._CasterID == null); + if (flag) + { + this._CasterID = (value ? new ulong?(this.CasterID) : null); + } + } + } + + private ulong? _time; + + private ulong? _uID; + + private readonly List _AttrID = new List(); + + private readonly List _AttrValue = new List(); + + private bool? _showHUD; + + private bool? _needHUD; + + private ulong? _CasterID; + + private IExtension extensionObject; + + private bool ShouldSerializetime() + { + return this.timeSpecified; + } + + private void Resettime() + { + this.timeSpecified = false; + } + + private bool ShouldSerializeuID() + { + return this.uIDSpecified; + } + + private void ResetuID() + { + this.uIDSpecified = false; + } + + private bool ShouldSerializeshowHUD() + { + return this.showHUDSpecified; + } + + private void ResetshowHUD() + { + this.showHUDSpecified = false; + } + + private bool ShouldSerializeneedHUD() + { + return this.needHUDSpecified; + } + + private void ResetneedHUD() + { + this.needHUDSpecified = false; + } + + private bool ShouldSerializeCasterID() + { + return this.CasterIDSpecified; + } + + private void ResetCasterID() + { + this.CasterIDSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0