| | |
| | | /// <summary> |
| | | /// 弹窗处理器 - 负责管理游戏中的弹窗队列,按顺序显示弹窗窗口 |
| | | /// 避免多个窗口同时弹出造成界面混乱 |
| | | /// 只有在homewin打开的情况下才触发 |
| | | /// </summary> |
| | | public class PopupWindowsProcessor : SingletonMonobehaviour<PopupWindowsProcessor> |
| | | { |
| | |
| | | } |
| | | |
| | | // 检查是否在新手引导中 |
| | | // 注意:NewBieCenter在当前代码库中不存在,暂时注释掉相关检查 |
| | | // if (NewBieCenter.Instance.inGuiding) |
| | | // { |
| | | // return; |
| | | // } |
| | | if (NewBieCenter.Instance.inGuiding) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | if (popupWindowQueue.Count == 0) |
| | | { |
| | |
| | | if (UIManager.Instance.IsOpened<LoadingWin>()) |
| | | return; |
| | | |
| | | // 检查是否存在全屏或遮罩窗口 |
| | | // 注意:ExistAnyFullScreenOrMaskWin方法在当前UIManager中不存在,暂时注释掉相关检查 |
| | | // if (UIManager.Instance.ExistAnyFullScreenOrMaskWin()) |
| | | // return; |
| | | if (!UIManager.Instance.IsOpened<HomeWin>()) |
| | | return; |
| | | |
| | | if (UIManager.Instance.IsOpened(popupWindowQueue[0].window)) |
| | | { |
| | | //当前模式可以打开多个相同窗口,增加防范 |
| | | return; |
| | | } |
| | | |
| | | if (currentWindow.window != null) |
| | | { |
| | |
| | | if (ui != null && ui.IsActive()) |
| | | return; |
| | | |
| | | currentWindow = popupWindowQueue[0]; |
| | | popupWindowQueue.RemoveAt(0); |
| | | UIManager.Instance.OpenWindow(currentWindow.window, currentWindow.functionId); |
| | | Debug.LogFormat("推送窗口 " + currentWindow.window); |
| | | } |
| | | else |
| | | { |
| | | currentWindow = popupWindowQueue[0]; |
| | | popupWindowQueue.RemoveAt(0); |
| | | UIManager.Instance.OpenWindow(currentWindow.window, currentWindow.functionId); |
| | | Debug.LogFormat("推送窗口 " + currentWindow.window); |
| | | } |
| | | |
| | | currentWindow = popupWindowQueue[0]; |
| | | popupWindowQueue.RemoveAt(0); |
| | | UIManager.Instance.OpenWindow(currentWindow.window, currentWindow.functionId); |
| | | Debug.LogFormat("推送窗口 " + currentWindow.window); |
| | | |
| | | lastTime = Time.realtimeSinceStartup; |
| | | } |
| | | |