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/XCommandMove.cs | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/XCommandMove.cs (limited to 'Client/Assets/Scripts/XMainClient/XCommandMove.cs') diff --git a/Client/Assets/Scripts/XMainClient/XCommandMove.cs b/Client/Assets/Scripts/XMainClient/XCommandMove.cs new file mode 100644 index 00000000..702a3f64 --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/XCommandMove.cs @@ -0,0 +1,47 @@ +using System; +using UnityEngine; +using XMainClient.UI.UICommon; +using XUpdater; +using XUtliPoolLib; + +namespace XMainClient +{ + internal class XCommandMove : XBaseCommand + { + private uint _time = 0u; + + public override bool Execute() + { + this._time = XSingleton.singleton.SetTimer(this._cmd.interalDelay, new XTimerMgr.ElapsedEventHandler(this.ShowVT), null); + base.publicModule(); + return true; + } + + protected void ShowVT(object o) + { + this._startTime = Time.time; + base.SetButtomText(); + DlgBase.singleton.ShowPanel(true, new Vector2(200f, 50f)); + bool pause = this._cmd.pause; + if (pause) + { + XSingleton.singleton.Pause = true; + } + } + + public override void Stop() + { + DlgBase.singleton.ShowPanel(false, Vector2.zero); + bool flag = this._time > 0u; + if (flag) + { + XSingleton.singleton.KillTimer(this._time); + this._time = 0u; + } + base.DestroyButtomText(); + base.DestroyOverlay(); + XSingleton.singleton.Pause = false; + XSingleton.singleton.Exculsive = false; + } + } +} -- cgit v1.1-26-g67d0