From 17c684a98dd8811fd22ced8da1590e08d3bc4831 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期日, 28 四月 2019 10:32:26 +0800
Subject: [PATCH] Merge branch 'master' into ViewOtherPlayer

---
 System/WindowBase/WindowCenter.cs |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/System/WindowBase/WindowCenter.cs b/System/WindowBase/WindowCenter.cs
index 3789cd3..8fc9dc4 100644
--- a/System/WindowBase/WindowCenter.cs
+++ b/System/WindowBase/WindowCenter.cs
@@ -553,6 +553,7 @@
         float checkTimer = 0f;
         private void LateUpdate()
         {
+            var checkMainWinImmedidately = closeCommands.Count + openCommands.Count > 0;
             while (closeCommands.Count > 0)
             {
                 var command = closeCommands[0];
@@ -594,7 +595,7 @@
 
             }
 
-            checkTimer += Time.deltaTime;
+            checkTimer += checkMainWinImmedidately ? 1f : Time.deltaTime;
             if (checkTimer > 0.5f)
             {
                 checkTimer = 0f;
@@ -609,15 +610,15 @@
                         && !IsOpen("HazyRegionDialogueWin")
                         && !IsOpen("NormalDialogueWin");
 
-                    if (exceptOpen != IsOpen("MainInterfaceWin"))
+                    if (exceptOpen != IsOpen("MainInterfaceWin") && windows.ContainsKey("MainInterfaceWin"))
                     {
                         if (exceptOpen)
                         {
-                            Open("MainInterfaceWin", true);
+                            windows["MainInterfaceWin"].Open();
                         }
                         else
                         {
-                            Close("MainInterfaceWin");
+                            windows["MainInterfaceWin"].CloseImmediately();
                         }
                     }
                 }

--
Gitblit v1.8.0