From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/KKSG/GMCmdArg.cs | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/GMCmdArg.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/GMCmdArg.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/GMCmdArg.cs b/Client/Assets/Scripts/XMainClient/KKSG/GMCmdArg.cs new file mode 100644 index 00000000..e8ecad0a --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/GMCmdArg.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "GMCmdArg")] + [Serializable] + public class GMCmdArg : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "cmd", DataFormat = DataFormat.Default)] + public string cmd + { + get + { + return this._cmd ?? ""; + } + set + { + this._cmd = value; + } + } + + [XmlIgnore] + [Browsable(false)] + public bool cmdSpecified + { + get + { + return this._cmd != null; + } + set + { + bool flag = value == (this._cmd == null); + if (flag) + { + this._cmd = (value ? this.cmd : null); + } + } + } + + [ProtoMember(2, Name = "args", DataFormat = DataFormat.Default)] + public List args + { + get + { + return this._args; + } + } + + private string _cmd; + + private readonly List _args = new List(); + + private IExtension extensionObject; + + private bool ShouldSerializecmd() + { + return this.cmdSpecified; + } + + private void Resetcmd() + { + this.cmdSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0