diff options
author | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-01-25 14:28:30 +0800 |
commit | 6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch) | |
tree | 7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/XCommandMove.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/XCommandMove.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/XCommandMove.cs | 47 |
1 files changed, 47 insertions, 0 deletions
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<XTimerMgr>.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<VirtualJoystick, VirtualJoystickBehaviour>.singleton.ShowPanel(true, new Vector2(200f, 50f));
+ bool pause = this._cmd.pause;
+ if (pause)
+ {
+ XSingleton<XShell>.singleton.Pause = true;
+ }
+ }
+
+ public override void Stop()
+ {
+ DlgBase<VirtualJoystick, VirtualJoystickBehaviour>.singleton.ShowPanel(false, Vector2.zero);
+ bool flag = this._time > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._time);
+ this._time = 0u;
+ }
+ base.DestroyButtomText();
+ base.DestroyOverlay();
+ XSingleton<XShell>.singleton.Pause = false;
+ XSingleton<XTutorialMgr>.singleton.Exculsive = false;
+ }
+ }
+}
|