少年修仙传客户端代码仓库
client_Wu Xijin
2019-02-05 149eef2dbc8ede15aac9322a938259f47facaf7a
3335 新年第二弹,自动弹窗管理。
1个文件已修改
24 ■■■■ 已修改文件
System/WindowBase/PopupWindowsProcessor.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/PopupWindowsProcessor.cs
@@ -1,19 +1,21 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Snxxz.UI;
public class PopupWindowsProcessor : SingletonMonobehaviour<PopupWindowsProcessor>
{
    Queue<string> popupWindowQueue = new Queue<string>();
    List<string> popupWindowQueue = new List<string>();
    string currentWindow = string.Empty;
    public void Add(string name)
    {
        popupWindowQueue.Add(name);
    }
    public void Remove(string name)
    {
        popupWindowQueue.Remove(name);
    }
    private void LateUpdate()
@@ -38,11 +40,27 @@
            return;
        }
        if (NewBieCenter.Instance.inGuiding)
        {
            return;
        }
        if (popupWindowQueue.Count == 0)
        {
            return;
        }
        if (!string.IsNullOrEmpty(currentWindow))
        {
            if (!WindowCenter.Instance.IsOpen(currentWindow)
                && !WindowCenter.Instance.ExistAnyFullScreenOrMaskWin())
            {
                currentWindow = popupWindowQueue[0];
                popupWindowQueue.RemoveAt(0);
                WindowCenter.Instance.Open(currentWindow);
            }
        }
    }
}