From c0bfb60bd9b705d973a94a3d7e01ee6039b022b9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-SAJ6RKV\\Administrator" Date: Tue, 27 May 2025 21:11:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HotFix/GameLogic/UI/UIVipLiWuHongItem.cs | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIVipLiWuHongItem.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIVipLiWuHongItem.cs index 07991e49..019fdf64 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIVipLiWuHongItem.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/UI/UIVipLiWuHongItem.cs @@ -51,18 +51,22 @@ namespace GameLogic //// 播放音效 //GameModule.Audio.Play(TEngine.AudioType.UISound, audioName, false, 0.5f, true); + + m_VideoPlayer.loopPointReached += HiddenVideoPlay; + m_VideoPlayer.targetTexture.DiscardContents(); m_VideoPlayer.clip = videoClip; m_VideoPlayer.Play(); - HideVideo(); + + } - protected override void OnUpdate() + + + private void HiddenVideoPlay(VideoPlayer player) { - base.OnUpdate(); - } - private async void HideVideo() - { - await UniTask.Delay(2000); + // m_VideoPlayer.targetTexture.DiscardContents(); + // GameModule.UI.CloseUI(); + m_VideoPlayer.targetTexture.DiscardContents(); GameModule.UI.CloseUI(); //GameModule.UI.CloseUI(); @@ -76,13 +80,6 @@ namespace GameLogic // 发送玩家送礼事件 GameEvent.Send(EventConts.AddGiftMessage, data, giftConfig, giftItemData.num); - - } - - private void HiddenVideoPlay(VideoPlayer player) - { - // m_VideoPlayer.targetTexture.DiscardContents(); - // GameModule.UI.CloseUI(); } } }