修复
This commit is contained in:
parent
b25d0db9f0
commit
c0bfb60bd9
@ -51,18 +51,22 @@ namespace GameLogic
|
|||||||
//// 播放音效
|
//// 播放音效
|
||||||
//GameModule.Audio.Play(TEngine.AudioType.UISound, audioName, false, 0.5f, true);
|
//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.clip = videoClip;
|
||||||
m_VideoPlayer.Play();
|
m_VideoPlayer.Play();
|
||||||
|
|
||||||
HideVideo();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
protected override void OnUpdate()
|
|
||||||
|
|
||||||
|
private void HiddenVideoPlay(VideoPlayer player)
|
||||||
{
|
{
|
||||||
base.OnUpdate();
|
// m_VideoPlayer.targetTexture.DiscardContents();
|
||||||
}
|
// GameModule.UI.CloseUI<UIVipLiWuHongItem>();
|
||||||
private async void HideVideo()
|
|
||||||
{
|
|
||||||
await UniTask.Delay(2000);
|
|
||||||
m_VideoPlayer.targetTexture.DiscardContents();
|
m_VideoPlayer.targetTexture.DiscardContents();
|
||||||
GameModule.UI.CloseUI<UIVipLiWuHongItem>();
|
GameModule.UI.CloseUI<UIVipLiWuHongItem>();
|
||||||
//GameModule.UI.CloseUI<UIVipItem_Old>();
|
//GameModule.UI.CloseUI<UIVipItem_Old>();
|
||||||
@ -76,13 +80,6 @@ namespace GameLogic
|
|||||||
|
|
||||||
// 发送玩家送礼事件
|
// 发送玩家送礼事件
|
||||||
GameEvent.Send(EventConts.AddGiftMessage, data, giftConfig, giftItemData.num);
|
GameEvent.Send(EventConts.AddGiftMessage, data, giftConfig, giftItemData.num);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HiddenVideoPlay(VideoPlayer player)
|
|
||||||
{
|
|
||||||
// m_VideoPlayer.targetTexture.DiscardContents();
|
|
||||||
// GameModule.UI.CloseUI<UIVipLiWuHongItem>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user