| | |
| | | List<int> allGuides = new List<int>();
|
| | | public List<int> completeGuidesBuf = new List<int>();
|
| | |
|
| | | //因其他原因导致的等待显示的引导窗口,在OpenWindow时会触发复查,但时机太晚增加关闭界面时触发
|
| | | List<string> waitGuideWinNames = new List<string>(); |
| | | //因其他原因导致的等待显示的引导窗口,关闭界面时触发检查,但一般在OpenWindow就会被提前处理
|
| | | List<int> waitGuideIDs = new List<int>(); |
| | |
|
| | | bool inited = false;
|
| | |
|
| | |
| | | //关闭其他界面时复查有没需要等待的引导
|
| | | void OnCloseWindow(UIBase _ui)
|
| | | {
|
| | | foreach (var winName in waitGuideWinNames)
|
| | | if (TryStartNewBieGuides(waitGuideIDs))
|
| | | {
|
| | | var guides = GuideConfig.GetGuideListByWinName(winName);
|
| | | if (guides != null)
|
| | | {
|
| | | if (TryStartNewBieGuides(guides))
|
| | | {
|
| | | break;
|
| | | }
|
| | | }
|
| | | Debug.Log("执行等待中的引导" + JsonMapper.ToJson(waitGuideIDs));
|
| | | }
|
| | |
|
| | | if (_ui.name == "StoryBossBattleWin")
|
| | | {
|
| | | //关闭界面才会触发的引导,如主线boss打完,特殊引导
|
| | | var guides = GuideConfig.GetGuideListByType((int)GuideTriggerType.PassMainBoss);
|
| | | if (guides != null)
|
| | | {
|
| | |
| | | (config.PauseMainBattle == 1 && PackManager.Instance.GetItems(PackType.DropItem).Count > 0
|
| | | && config.WinName != "EquipExchangeWin"))
|
| | | {
|
| | | Debug.Log("引导被中断,加入等待队列 " + config.ID);
|
| | | //如果子界面是必须挂在该界面上切且没有蒙版盖住的可以增加判断
|
| | | if (!waitGuideWinNames.Contains(config.WinName))
|
| | | if (!waitGuideIDs.Contains(config.ID))
|
| | | {
|
| | | waitGuideWinNames.Add(config.WinName);
|
| | | waitGuideIDs.Add(config.ID);
|
| | | }
|
| | | return true;
|
| | | }
|
| | |
| | | {
|
| | | return false;
|
| | | }
|
| | | if (waitGuideWinNames.Contains(config.WinName))
|
| | | if (waitGuideIDs.Contains(config.ID))
|
| | | {
|
| | | waitGuideWinNames.Remove(config.WinName);
|
| | | waitGuideIDs.Remove(config.ID);
|
| | | }
|
| | | currentGuide = _id;
|
| | |
|
| | | Debug.Log($"开始引导ID:{_id}");
|
| | |
|
| | | guideStep = config.Steps.Length > 0 ? config.Steps[0] : 0;
|
| | | var stepConfig = ScriptableObjectLoader.LoadSoNewBieGuideStep(guideStep);
|
| | | TryPauseStoryBattle();
|