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(); } } }