补充礼物视频特效
This commit is contained in:
parent
65d8ef4e5f
commit
81fdd143b2
@ -52,7 +52,7 @@ namespace GameLogic
|
||||
m_GameTimerLen = EventConts.gameLenTiemr;
|
||||
|
||||
// 设置数据同步
|
||||
// GiftEffectBool = GameModule.Setting.GetBool("GiftEffect");
|
||||
GiftEffectBool = GameModule.Setting.GetBool("GiftEffect");
|
||||
WorldEffectBool = GameModule.Setting.GetBool("WorldEffect");
|
||||
|
||||
}
|
||||
@ -691,7 +691,6 @@ namespace GameLogic
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 礼物序列帧
|
||||
if (m_GiftItemDatas.Count > 0 && GiftEffectBool)
|
||||
{
|
||||
|
@ -41,14 +41,15 @@ namespace GameLogic
|
||||
// 根据礼物Id,加载对应的视频名称
|
||||
// GiftConfig giftConfig = ConfigSystem.Instance.Tables.TbGift.Get(giftItemData.giftId);
|
||||
// string videoName = giftItemData.m_TeamEnum == TeamUnitEnum.Left? giftConfig.LeftVIdeoName:giftConfig.RightVideoName;
|
||||
string videoName = "Gift0" + (giftItemData.giftId - 1);
|
||||
string videoName = "Gift0" + (giftItemData.giftId);
|
||||
m_VideoPlayer.loopPointReached += HiddenVideoPlay;
|
||||
|
||||
var videoClip = GameModule.Resource.LoadAsset<VideoClip>(videoName);
|
||||
string audioName = "礼物" + (giftItemData.giftId - 1);
|
||||
|
||||
// 播放音效
|
||||
GameModule.Audio.Play(TEngine.AudioType.UISound, audioName, false, 0.5f, true);
|
||||
//string audioName = "礼物" + (giftItemData.giftId - 1);
|
||||
//// 播放音效
|
||||
//GameModule.Audio.Play(TEngine.AudioType.UISound, audioName, false, 0.5f, true);
|
||||
|
||||
m_VideoPlayer.clip = videoClip;
|
||||
m_VideoPlayer.Play();
|
||||
|
||||
@ -62,8 +63,9 @@ namespace GameLogic
|
||||
{
|
||||
await UniTask.Delay(2000);
|
||||
m_VideoPlayer.targetTexture.DiscardContents();
|
||||
GameModule.UI.CloseUI<UIVipItem_Old>();
|
||||
GameModule.UI.ShowUI<UIVipItem>(UserDatas);
|
||||
GameModule.UI.CloseUI<UIVipLiWuHongItem>();
|
||||
//GameModule.UI.CloseUI<UIVipItem_Old>();
|
||||
//GameModule.UI.ShowUI<UIVipItem>(UserDatas);
|
||||
}
|
||||
|
||||
private void HiddenVideoPlay(VideoPlayer player)
|
||||
|
Loading…
x
Reference in New Issue
Block a user