summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-01-25 14:28:30 +0800
committerchai <chaifix@163.com>2021-01-25 14:28:30 +0800
commit6eb915c129fc90c6f4c82ae097dd6ffad5239efc (patch)
tree7dd2be50edf41f36b60fac84696e731c13afe617 /Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs')
-rw-r--r--Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs68
1 files changed, 68 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs b/Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs
new file mode 100644
index 00000000..d33f1585
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs
@@ -0,0 +1,68 @@
+using System;
+using UILib;
+using UnityEngine;
+using XUpdater;
+using XUtliPoolLib;
+
+namespace XMainClient.Tutorial.Command
+{
+ internal class XCommandEmpty : XBaseCommand
+ {
+ private uint _time = 0u;
+
+ public override bool Execute()
+ {
+ this._startTime = Time.time;
+ bool flag = this._cmd.interalDelay > 0f;
+ if (flag)
+ {
+ base.SetOverlay();
+ }
+ this._time = XSingleton<XTimerMgr>.singleton.SetTimer(this._cmd.interalDelay, new XTimerMgr.ElapsedEventHandler(this.ShowFinger), null);
+ base.publicModule();
+ return true;
+ }
+
+ protected void ShowFinger(object o)
+ {
+ base.SetOverlay();
+ base.SetAilin();
+ bool flag = string.IsNullOrEmpty(this._cmd.ailinText) && XBaseCommand._Overlay != null;
+ if (flag)
+ {
+ IXUISprite ixuisprite = XBaseCommand._Overlay.transform.Find("Left").GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnMouseClick));
+ }
+ bool pause = this._cmd.pause;
+ if (pause)
+ {
+ XSingleton<XShell>.singleton.Pause = true;
+ }
+ }
+
+ protected override void OnMouseClick(IXUISprite sp)
+ {
+ base.OnMouseClick(sp);
+ bool flag = string.IsNullOrEmpty(this._cmd.ailinText);
+ if (flag)
+ {
+ XSingleton<XTutorialMgr>.singleton.OnCmdFinished();
+ }
+ }
+
+ public override void Stop()
+ {
+ bool flag = this._time > 0u;
+ if (flag)
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(this._time);
+ this._time = 0u;
+ }
+ base.DestroyText();
+ base.DestroyAilin();
+ base.DestroyOverlay();
+ XSingleton<XShell>.singleton.Pause = false;
+ XSingleton<XTutorialMgr>.singleton.NoforceClick = false;
+ }
+ }
+}