From 485db99b5c51a971c173664cf6e808dc8424b0a0 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期五, 17 十月 2025 17:19:51 +0800
Subject: [PATCH] 136 子 【挑战】战锤秘境 / 【挑战】战锤秘境-客户端 移除错误接入
---
Main/Component/UI/Common/PopupWindowsProcessor.cs | 69 ++++++++++++++++++++++------------
1 files changed, 45 insertions(+), 24 deletions(-)
diff --git a/Main/Component/UI/Common/PopupWindowsProcessor.cs b/Main/Component/UI/Common/PopupWindowsProcessor.cs
index 32e8c29..8e65e67 100644
--- a/Main/Component/UI/Common/PopupWindowsProcessor.cs
+++ b/Main/Component/UI/Common/PopupWindowsProcessor.cs
@@ -1,22 +1,27 @@
-using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 寮圭獥澶勭悊鍣� - 璐熻矗绠$悊娓告垙涓殑寮圭獥闃熷垪锛屾寜椤哄簭鏄剧ず寮圭獥绐楀彛
/// 閬垮厤澶氫釜绐楀彛鍚屾椂寮瑰嚭閫犳垚鐣岄潰娣蜂贡
+/// 鍙湁鍦╤omewin鎵撳紑鐨勬儏鍐典笅鎵嶈Е鍙�
/// </summary>
public class PopupWindowsProcessor : SingletonMonobehaviour<PopupWindowsProcessor>
{
// 寮圭獥闃熷垪锛屽瓨鍌ㄥ緟澶勭悊鐨勫脊绐楄姹�
List<PopupWindow> popupWindowQueue = new List<PopupWindow>();
-
+
// 褰撳墠姝e湪鏄剧ず鐨勫脊绐�
PopupWindow currentWindow;
+ float firstTime = 0; //鎵撳紑HomeWin鏃剁殑鏃堕棿
+ float stayTime;
+ bool homeWinFirstOpened = false; //HomeWin鏄惁绗竴娆℃墦寮�
+
+
// 涓婃寮圭獥鏃堕棿锛岀敤浜庢帶鍒跺脊绐椾箣闂寸殑闂撮殧
float lastTime = 0; //涓婃寮圭獥鏃堕棿
-
+
/// <summary>
/// 娣诲姞涓�涓脊绐楀埌澶勭悊闃熷垪
/// </summary>
@@ -57,6 +62,7 @@
}
}
+
/// <summary>
/// LateUpdate涓鐞嗗脊绐楅槦鍒楋紝纭繚鍦ㄦ墍鏈夊叾浠栭�昏緫澶勭悊瀹屾瘯鍚庢墠鏄剧ず寮圭獥
/// </summary>
@@ -77,11 +83,10 @@
}
// 妫�鏌ユ槸鍚﹀湪鏂版墜寮曞涓�
- // 娉ㄦ剰锛歂ewBieCenter鍦ㄥ綋鍓嶄唬鐮佸簱涓笉瀛樺湪锛屾殏鏃舵敞閲婃帀鐩稿叧妫�鏌�
- // if (NewBieCenter.Instance.inGuiding)
- // {
- // return;
- // }
+ if (NewBieCenter.Instance.inGuiding)
+ {
+ return;
+ }
if (popupWindowQueue.Count == 0)
{
@@ -92,10 +97,31 @@
if (UIManager.Instance.IsOpened<LoadingWin>())
return;
- // 妫�鏌ユ槸鍚﹀瓨鍦ㄥ叏灞忔垨閬僵绐楀彛
- // 娉ㄦ剰锛欵xistAnyFullScreenOrMaskWin鏂规硶鍦ㄥ綋鍓峌IManager涓笉瀛樺湪锛屾殏鏃舵敞閲婃帀鐩稿叧妫�鏌�
- // if (UIManager.Instance.ExistAnyFullScreenOrMaskWin())
- // return;
+ if (!UIManager.Instance.IsOpened<HomeWin>())
+ return;
+
+ // 绗竴娆℃墦寮�HomeWin鏃惰褰曟椂闂�
+ if (!homeWinFirstOpened)
+ {
+ firstTime = Time.realtimeSinceStartup;
+ homeWinFirstOpened = true;
+ stayTime = float.Parse(FuncConfigConfig.Get("PopWin").Numerical1);
+ return;
+ }
+ // 绛夊緟x绉�
+ if (Time.realtimeSinceStartup - firstTime < stayTime)
+ return;
+
+ if (UIManager.Instance.IsOpened(popupWindowQueue[0].window))
+ {
+ //褰撳墠妯″紡鍙互鎵撳紑澶氫釜鐩稿悓绐楀彛锛屽鍔犻槻鑼�
+ return;
+ }
+
+ if (UIManager.Instance.ExistAnyFullScreenOrMaskWin(popupWindowQueue[0].window))
+ return;
+
+
if (currentWindow.window != null)
{
@@ -104,18 +130,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;
}
@@ -127,7 +148,7 @@
{
// 绐楀彛鍚嶇О
public string window;
-
+
// 鍔熻兘ID锛岀敤浜庢寚瀹氱獥鍙g殑鍏蜂綋鍔熻兘鎴栨樉绀烘ā寮�
public int functionId;
--
Gitblit v1.8.0