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/FinishStateInfo.cs | 105 +++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/KKSG/FinishStateInfo.cs (limited to 'Client/Assets/Scripts/XMainClient/KKSG/FinishStateInfo.cs') diff --git a/Client/Assets/Scripts/XMainClient/KKSG/FinishStateInfo.cs b/Client/Assets/Scripts/XMainClient/KKSG/FinishStateInfo.cs new file mode 100644 index 00000000..789b625c --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/KKSG/FinishStateInfo.cs @@ -0,0 +1,105 @@ +using System; +using System.ComponentModel; +using System.Xml.Serialization; +using ProtoBuf; + +namespace KKSG +{ + [ProtoContract(Name = "FinishStateInfo")] + [Serializable] + public class FinishStateInfo : IExtensible + { + [ProtoMember(1, IsRequired = false, Name = "state", DataFormat = DataFormat.TwosComplement)] + public SceneFinishState state + { + get + { + return this._state ?? SceneFinishState.SCENE_FINISH_NONE; + } + set + { + this._state = new SceneFinishState?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool stateSpecified + { + get + { + return this._state != null; + } + set + { + bool flag = value == (this._state == null); + if (flag) + { + this._state = (value ? new SceneFinishState?(this.state) : null); + } + } + } + + [ProtoMember(2, IsRequired = false, Name = "countdown", DataFormat = DataFormat.TwosComplement)] + public int countdown + { + get + { + return this._countdown ?? 0; + } + set + { + this._countdown = new int?(value); + } + } + + [XmlIgnore] + [Browsable(false)] + public bool countdownSpecified + { + get + { + return this._countdown != null; + } + set + { + bool flag = value == (this._countdown == null); + if (flag) + { + this._countdown = (value ? new int?(this.countdown) : null); + } + } + } + + private SceneFinishState? _state; + + private int? _countdown; + + private IExtension extensionObject; + + private bool ShouldSerializestate() + { + return this.stateSpecified; + } + + private void Resetstate() + { + this.stateSpecified = false; + } + + private bool ShouldSerializecountdown() + { + return this.countdownSpecified; + } + + private void Resetcountdown() + { + this.countdownSpecified = false; + } + + IExtension IExtensible.GetExtensionObject(bool createIfMissing) + { + return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); + } + } +} -- cgit v1.1-26-g67d0