summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/XCommandMove.cs
blob: 702a3f6478e824285e88abb8c622c45f1ce41ce6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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;
		}
	}
}