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/SpriteOperationRes.cs | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/SpriteOperationRes.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/SpriteOperationRes.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/SpriteOperationRes.cs b/Client/Assets/Scripts/XMainClient/KKSG/SpriteOperationRes.cs new file mode 100644 index 00000000..5dcc1539 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/SpriteOperationRes.cs @@ -0,0 +1,171 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "SpriteOperationRes")] + [Serializable] + public class SpriteOperationRes : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "ErrorCode", DataFormat = DataFormat.TwosComplement)] + public ErrorCode ErrorCode + { + get + { + return this._ErrorCode ?? ErrorCode.ERR_SUCCESS; + } + set + { + this._ErrorCode = new ErrorCode?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool ErrorCodeSpecified + { + get + { + return this._ErrorCode != null; + } + set + { + bool flag = value == (this._ErrorCode == null); + if (flag) + { + this._ErrorCode = (value ? new ErrorCode?(this.ErrorCode) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "Exp", DataFormat = DataFormat.TwosComplement)] + public uint Exp + { + get + { + return this._Exp ?? 0u; + } + set + { + this._Exp = new uint?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool ExpSpecified + { + get + { + return this._Exp != null; + } + set + { + bool flag = value == (this._Exp == null); + if (flag) + { + this._Exp = (value ? new uint?(this.Exp) : null); + } + } + } + + [ProtoMember(3, IsRequired = false, Name = "AwakeSpriteBefore", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public SpriteInfo AwakeSpriteBefore + { + get + { + return this._AwakeSpriteBefore; + } + set + { + this._AwakeSpriteBefore = value; + } + } + + [ProtoMember(4, IsRequired = false, Name = "AwakeSprite", DataFormat = DataFormat.Default)] + [DefaultValue(null)] + public SpriteInfo AwakeSprite + { + get + { + return this._AwakeSprite; + } + set + { + this._AwakeSprite = value; + } + } + + [ProtoMember(5, Name = "InFight", DataFormat = DataFormat.TwosComplement)] + public List InFight + { + get + { + return this._InFight; + } + } + + [ProtoMember(6, Name = "LastTrainAttrID", DataFormat = DataFormat.TwosComplement)] + public List LastTrainAttrID + { + get + { + return this._LastTrainAttrID; + } + } + + [ProtoMember(7, Name = "LastTrainAttrValue", DataFormat = DataFormat.TwosComplement)] + public List LastTrainAttrValue + { + get + { + return this._LastTrainAttrValue; + } + } + + private ErrorCode? _ErrorCode; + + private uint? _Exp; + + private SpriteInfo _AwakeSpriteBefore = null; + + private SpriteInfo _AwakeSprite = null; + + private readonly List _InFight = new List(); + + private readonly List _LastTrainAttrID = new List(); + + private readonly List _LastTrainAttrValue = new List(); + + private IExtension extensionObject; + + private bool ShouldSerializeErrorCode() + { + return this.ErrorCodeSpecified; + } + + private void ResetErrorCode() + { + this.ErrorCodeSpecified = false; + } + + private bool ShouldSerializeExp() + { + return this.ExpSpecified; + } + + private void ResetExp() + { + this.ExpSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0