From 8fabb1c4f554de57cdda920faa1bc968fbb6198b Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Wed, 4 Jun 2025 03:16:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86Bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab | 12 ++++++------ .../HotFix/GameLogic/Common/EventConts.cs | 4 +++- .../HotFix/GameLogic/Manager/DataGameSceneManager.cs | 4 +++- .../GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs | 8 ++++++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab index 34904e03..6812b9d9 100644 --- a/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab +++ b/UnityProject/Assets/AssetRaw/UI/UIGameBattle.prefab @@ -244,7 +244,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -264.2, y: 532.8} + m_AnchoredPosition: {x: -78, y: -16} m_SizeDelta: {x: 285, y: 29} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3189433913552645289 @@ -37091,7 +37091,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -66, y: 536.5} + m_AnchoredPosition: {x: 120.20001, y: -12.299927} m_SizeDelta: {x: 85, y: 42} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2461786428479395444 @@ -72767,7 +72767,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -448.5, y: 550.8} + m_AnchoredPosition: {x: -262.3, y: 2.000061} m_SizeDelta: {x: 116, y: 117} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &8685427069739642340 @@ -78162,8 +78162,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} + m_AnchoredPosition: {x: -194, y: 624} + m_SizeDelta: {x: 673.4304, y: 121.1576} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &7971765919379679797 GameObject: @@ -93071,7 +93071,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -264.2, y: 532.8} + m_AnchoredPosition: {x: -78, y: -15.999939} m_SizeDelta: {x: 285, y: 29} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &192554144869663598 diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs index 951f052b..a5c6baa3 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Common/EventConts.cs @@ -28,9 +28,11 @@ namespace GameLogic public static GameModelType gameModel = GameModelType.快速; - public static int GmActorId = 1; + public static int HuangJinShiDaiEnd = 5; // 黄金时代结束时间 + + // 测试玩家头像Url public const string TestPlayerUrl = "https://p3.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-i-0813_2b95d7b6faea4cd09cd872ca826930bc.png"; diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index 18f4f2ac..e9515cd5 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -704,6 +704,8 @@ namespace GameLogic GameModule.Timer.RemoveTimer(m_ShiJianTimerId); } + Log.Debug("游戏朝代切换..."); + m_ShiJianTimerId = GameModule.Timer.AddTimer((e) => { Log.Debug("触发黄金时代结束"); @@ -714,7 +716,7 @@ namespace GameLogic GameEvent.Send(EventConts.HuangJinGameEnd); - }, 30); + }, EventConts.HuangJinShiDaiEnd); } diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs index 77362753..a8a7521b 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIGameBattle.cs @@ -281,6 +281,10 @@ namespace GameLogic }; + var videoClip = GameModule.Resource.LoadAsset(videoName); + m_video_Video.clip = videoClip; + m_video_Video.Play(); + // 历史事件时间周期 if (m_LishiId != -1) { @@ -380,6 +384,10 @@ namespace GameLogic // 替换UI图 SwitchUIResource(); + + + // 清除视频上的targetTexture残像 + m_video_Video.targetTexture.Release(); }; // 播放音频