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/EffectData.cs | 117 +++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/EffectData.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/EffectData.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/EffectData.cs b/Client/Assets/Scripts/XMainClient/KKSG/EffectData.cs new file mode 100644 index 00000000..25883ef8 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/EffectData.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "EffectData")] + [Serializable] + public class EffectData : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "effectID", DataFormat = DataFormat.TwosComplement)] + public uint effectID + { + get + { + return this._effectID ?? 0u; + } + set + { + this._effectID = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool effectIDSpecified + { + get + { + return this._effectID != null; + } + set + { + bool flag = value == (this._effectID == null); + if (flag) + { + this._effectID = (value ? new uint?(this.effectID) : null); + } + } + } + + [ProtoMember(2, Name = "multiParams", DataFormat = DataFormat.Default)] + public List multiParams + { + get + { + return this._multiParams; + } + } + + [ProtoMember(3, IsRequired = false, Name = "isWork", DataFormat = DataFormat.Default)] + public bool isWork + { + get + { + return this._isWork ?? false; + } + set + { + this._isWork = new bool?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool isWorkSpecified + { + get + { + return this._isWork != null; + } + set + { + bool flag = value == (this._isWork == null); + if (flag) + { + this._isWork = (value ? new bool?(this.isWork) : null); + } + } + } + + private uint? _effectID; + + private readonly List _multiParams = new List(); + + private bool? _isWork; + + private IExtension extensionObject; + + private bool ShouldSerializeeffectID() + { + return this.effectIDSpecified; + } + + private void ReseteffectID() + { + this.effectIDSpecified = false; + } + + private bool ShouldSerializeisWork() + { + return this.isWorkSpecified; + } + + private void ResetisWork() + { + this.isWorkSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0