| | |
| | | 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() |
| | |
| | | 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); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |