257 子 【配套功能】新手引导 / 【常规】引导 - 修复和推送功能同时打开问题
2个文件已修改
45 ■■■■ 已修改文件
Main/Component/UI/Common/ClickScreenOtherSpace.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/PopupWindowsProcessor.cs 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Main/Component/UI/Common/ClickScreenOtherSpace.cs
@@ -46,20 +46,20 @@
                case RespondType.In:
                    if (RectTransformUtility.RectangleContainsScreenPoint(this.transform as RectTransform, sp, CameraManager.uiCamera))
                    {
                        m_ClickOtherEvent?.Invoke();
                        this.SetActive(!m_DeActiveSelf);
                        m_ClickOtherEvent?.Invoke();
                    }
                    break;
                case RespondType.Out:
                    if (!RectTransformUtility.RectangleContainsScreenPoint(this.transform as RectTransform, sp, CameraManager.uiCamera))
                    {
                        m_ClickOtherEvent?.Invoke();
                        this.SetActive(!m_DeActiveSelf);
                        m_ClickOtherEvent?.Invoke();
                    }
                    break;
                case RespondType.InOut:
                    m_ClickOtherEvent?.Invoke();
                    this.SetActive(!m_DeActiveSelf);
                    m_ClickOtherEvent?.Invoke();
                    break;
            }
        }
Main/Component/UI/Common/PopupWindowsProcessor.cs
@@ -5,6 +5,7 @@
/// <summary>
/// 弹窗处理器 - 负责管理游戏中的弹窗队列,按顺序显示弹窗窗口
/// 避免多个窗口同时弹出造成界面混乱
/// 只有在homewin打开的情况下才触发
/// </summary>
public class PopupWindowsProcessor : SingletonMonobehaviour<PopupWindowsProcessor>
{
@@ -77,11 +78,10 @@
        }
        // 检查是否在新手引导中
        // 注意:NewBieCenter在当前代码库中不存在,暂时注释掉相关检查
        // if (NewBieCenter.Instance.inGuiding)
        // {
        //     return;
        // }
        if (NewBieCenter.Instance.inGuiding)
        {
            return;
        }
        if (popupWindowQueue.Count == 0)
        {
@@ -92,10 +92,14 @@
        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)
        {
@@ -104,18 +108,13 @@
            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;
    }