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/mobaend.cs |
+scripts
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/mobaend.cs')
-rw-r--r-- | Client/Assets/Scripts/XMainClient/mobaend.cs | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/mobaend.cs b/Client/Assets/Scripts/XMainClient/mobaend.cs new file mode 100644 index 00000000..ad5e813d --- /dev/null +++ b/Client/Assets/Scripts/XMainClient/mobaend.cs @@ -0,0 +1,56 @@ +using System;
+using System.Collections.Generic;
+using KKSG;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class mobaend
+ {
+ private static uint _token = 0u;
+
+ private static bool _started = false;
+
+ public static bool Do(List<XActor> actors)
+ {
+ bool flag = !mobaend._started;
+ if (flag)
+ {
+ mobaend._started = true;
+ mobaend.Start();
+ }
+ else
+ {
+ bool flag2 = !XSingleton<XCutScene>.singleton.IsPlaying;
+ if (flag2)
+ {
+ mobaend._started = false;
+ mobaend.End();
+ }
+ }
+ return true;
+ }
+
+ private static void Start()
+ {
+ float interval = float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("MobaEndShowUITime"));
+ mobaend._token = XSingleton<XTimerMgr>.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(mobaend.ShowResult), null);
+ }
+
+ private static void ShowResult(object o = null)
+ {
+ DlgBase<MobaEndDlg, MobaBehaviour>.singleton.SetVisible(true, true);
+ XLevelRewardDocument specificDocument = XDocuments.GetSpecificDocument<XLevelRewardDocument>(XLevelRewardDocument.uuID);
+ DlgBase<MobaEndDlg, MobaBehaviour>.singleton.SetPic(specificDocument.MobaData.Result == HeroBattleOver.HeroBattleOver_Win);
+ }
+
+ private static void End()
+ {
+ XSingleton<XTimerMgr>.singleton.KillTimer(mobaend._token);
+ DlgBase<MobaEndDlg, MobaBehaviour>.singleton.SetVisible(false, true);
+ DlgBase<XLevelRewardView, XLevelRewardBehaviour>.singleton.CutSceneShowEnd();
+ }
+ }
+}
|