From b859308d3658d0d9bc41246349ce43be1f59f3b5 Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Fri, 6 Jun 2025 01:24:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameLogic/Manager/DataGameSceneManager.cs | 4 +--- .../HotFix/GameLogic/UI/UIGameMainForm.cs | 20 ++++++++++++++++--- .../HotFix/GameLogic/UI/UIGameRankForm.cs | 5 +++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index 3bfef5e0..fa510137 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -1282,9 +1282,7 @@ namespace GameLogic // 重新执行初始化数据流程 OnInit(); - // 重新打开UI界面 - GameModule.UI.CloseUI(); - GameModule.UI.ShowUI(); + // 重置UI数据 GameEvent.Send(EventConts.RestGameBattle); diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameMainForm.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameMainForm.cs index 7d53a9d8..907ec241 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameMainForm.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameMainForm.cs @@ -44,7 +44,7 @@ namespace GameLogic // 显示模式 - EventConts.gameModel = (GameModelType) gameLenTiemrId; + EventConts.gameModel = (GameModelType)gameLenTiemrId; // 设置游戏时长 switch (gameLenTiemrId) @@ -69,8 +69,22 @@ namespace GameLogic GameModule.Setting.SetInt("gameLenTiemrId", gameLenTiemrId); GameModule.Setting.Save(); - OnEnterGameAppProcedure onEnterGameAppProcedure = GameModule.Procedure.CurrentProcedure as OnEnterGameAppProcedure; - onEnterGameAppProcedure.GoToGame(); + var pr = GameModule.Procedure.CurrentProcedure as GameSceneProcedure; + + if (pr != null) + { + GameModule.UI.CloseUI(); + GameModule.UI.CloseUI(); + GameModule.UI.ShowUI(); + } + else + { + // 默认登录游戏流程 + OnEnterGameAppProcedure onEnterGameAppProcedure = GameModule.Procedure.CurrentProcedure as OnEnterGameAppProcedure; + onEnterGameAppProcedure.GoToGame(); + } + + GameModule.UI.CloseUI(); } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs index 06362300..6f927ae0 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameRankForm.cs @@ -49,11 +49,16 @@ namespace GameLogic { // 返回主界面 GameModule.UI.CloseUI(); + GameModule.UI.ShowUI(); } private void OnClick_RestBtn() { // 重新开始 GameModule.UI.CloseUI(); + + // 重新打开UI界面 + GameModule.UI.CloseUI(); + GameModule.UI.ShowUI(); } #endregion