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(); } } }