diff --git a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs index 1f701eab..6e5e45cc 100644 --- a/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs +++ b/UnityProject/Assets/GameScripts/HotFix/GameLogic/Manager/DataGameSceneManager.cs @@ -307,6 +307,13 @@ namespace GameLogic m_ProtCustMessageData = unitPlayerData.protCustMessageData }; + // 冠军时刻礼物效果翻倍 + if (isGaunJunShiKe) + { + num = num * 2; + } + + bool isAdd = true; // 先检测,队列中是否存在相同的礼物Id @@ -501,7 +508,7 @@ namespace GameLogic /// /// 能力药丸礼物效果 /// - private void NlywGiftFunc(GiftConfig giftConfig, int num, UnitPlayerData unitPlayerData) + private async Task NlywGiftFunc(GiftConfig giftConfig, int num, UnitPlayerData unitPlayerData) { var actor = GetTeamActor(unitPlayerData.teamId); if (actor == null) @@ -525,20 +532,24 @@ namespace GameLogic item.Value.AddBuff(m_Buff1, unitPlayerData, giftConfig); - // 添加减速Buff给到 - var eGo = GameModule.Resource.LoadGameObject(giftConfig.EffectName); - eGo.transform.SetParent(item.Value.GetRect().transform); - //eGo.transform.position = actor.GetRect().transform.position; - eGo.transform.localPosition = new Vector3(1500, 0, 0); - eGo.transform.localScale = Vector3.one * 20; - m_Buff1.m_EffectGo = eGo; - - // 移动特效 - eGo.transform.DOLocalMoveX(-2000, 16f).OnComplete(async () => + for (int i = 0; i < 5; i++) { - GameObject.Destroy(eGo); - }); + // 添加减速Buff给到 + var eGo = GameModule.Resource.LoadGameObject(giftConfig.EffectName); + eGo.transform.SetParent(item.Value.GetRect().transform); + //eGo.transform.position = actor.GetRect().transform.position; + eGo.transform.localPosition = new Vector3(1500, 0, 0); + eGo.transform.localScale = Vector3.one * 20; + m_Buff1.m_EffectGo = eGo; + // 移动特效 + eGo.transform.DOLocalMoveX(-2000, 16f).OnComplete(async () => + { + GameObject.Destroy(eGo); + }); + + await UniTask.Delay(500); // 延时1秒 + } } } }