From 149eef2dbc8ede15aac9322a938259f47facaf7a Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 05 二月 2019 10:04:50 +0800
Subject: [PATCH] 3335 新年第二弹,自动弹窗管理。
---
System/WindowBase/PopupWindowsProcessor.cs | 24 +++++++++++++++++++++---
1 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/System/WindowBase/PopupWindowsProcessor.cs b/System/WindowBase/PopupWindowsProcessor.cs
index 343eef8..8c829db 100644
--- a/System/WindowBase/PopupWindowsProcessor.cs
+++ b/System/WindowBase/PopupWindowsProcessor.cs
@@ -1,19 +1,21 @@
锘縰sing 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);
+ }
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.8.0