From 6eb915c129fc90c6f4c82ae097dd6ffad5239efc Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 25 Jan 2021 14:28:30 +0800 Subject: +scripts --- Client/Assets/Scripts/XMainClient/mobaend.cs | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Client/Assets/Scripts/XMainClient/mobaend.cs (limited to 'Client/Assets/Scripts/XMainClient/mobaend.cs') 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 actors) + { + bool flag = !mobaend._started; + if (flag) + { + mobaend._started = true; + mobaend.Start(); + } + else + { + bool flag2 = !XSingleton.singleton.IsPlaying; + if (flag2) + { + mobaend._started = false; + mobaend.End(); + } + } + return true; + } + + private static void Start() + { + float interval = float.Parse(XSingleton.singleton.GetValue("MobaEndShowUITime")); + mobaend._token = XSingleton.singleton.SetTimer(interval, new XTimerMgr.ElapsedEventHandler(mobaend.ShowResult), null); + } + + private static void ShowResult(object o = null) + { + DlgBase.singleton.SetVisible(true, true); + XLevelRewardDocument specificDocument = XDocuments.GetSpecificDocument(XLevelRewardDocument.uuID); + DlgBase.singleton.SetPic(specificDocument.MobaData.Result == HeroBattleOver.HeroBattleOver_Win); + } + + private static void End() + { + XSingleton.singleton.KillTimer(mobaend._token); + DlgBase.singleton.SetVisible(false, true); + DlgBase.singleton.CutSceneShowEnd(); + } + } +} -- cgit v1.1-26-g67d0