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/TargetHurtInfo.cs | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/TargetHurtInfo.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/TargetHurtInfo.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/TargetHurtInfo.cs b/Client/Assets/Scripts/XMainClient/KKSG/TargetHurtInfo.cs new file mode 100644 index 00000000..5adbc1a3 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/TargetHurtInfo.cs @@ -0,0 +1,78 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "TargetHurtInfo")] + [Serializable] + public class TargetHurtInfo : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "UnitID", DataFormat = DataFormat.TwosComplement)] + public ulong UnitID + { + get + { + return this._UnitID ?? 0UL; + } + set + { + this._UnitID = new ulong?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool UnitIDSpecified + { + get + { + return this._UnitID != null; + } + set + { + bool flag = value == (this._UnitID == null); + if (flag) + { + this._UnitID = (value ? new ulong?(this.UnitID) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "Result", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public DamageResult Result + { + get + { + return this._Result; + } + set + { + this._Result = value; + } + } + + private ulong? _UnitID; + + private DamageResult _Result = null; + + private IExtension extensionObject; + + private bool ShouldSerializeUnitID() + { + return this.UnitIDSpecified; + } + + private void ResetUnitID() + { + this.UnitIDSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0