From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- .../XMainClient/Tutorial/Command/XCommandEmpty.cs | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs (limited to 'Client/Assets/Scripts/XMainClient/Tutorial/Command/XCommandEmpty.cs') 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.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.singleton.Pause = true; + } + } + + protected override void OnMouseClick(IXUISprite sp) + { + base.OnMouseClick(sp); + bool flag = string.IsNullOrEmpty(this._cmd.ailinText); + if (flag) + { + XSingleton.singleton.OnCmdFinished(); + } + } + + public override void Stop() + { + bool flag = this._time > 0u; + if (flag) + { + XSingleton.singleton.KillTimer(this._time); + this._time = 0u; + } + base.DestroyText(); + base.DestroyAilin(); + base.DestroyOverlay(); + XSingleton.singleton.Pause = false; + XSingleton.singleton.NoforceClick = false; + } + } +} -- cgit v1.1-26-g67d0