This commit is contained in:
DESKTOP-SAJ6RKV\Administrator 2025-06-16 17:19:44 +08:00
parent 50ad57bb03
commit d02080c883
4 changed files with 26 additions and 11 deletions

View File

@ -159,7 +159,7 @@ namespace GameLogic
private void AddMyPush()
{
// 最终结果值 = 初始推力+玩家数量 + 永久增加推力值
m_AddPush = EventConts.InitPower + (m_ListUnitPlayDatas.Count * EventConts.PlayerScale) + m_AllAddPush ;
m_AddPush = EventConts.InitPower + (m_ListUnitPlayDatas.Count * EventConts.PlayerScale) + m_AllAddPush;
foreach (var item in m_Buffs)
{
@ -191,7 +191,6 @@ namespace GameLogic
// 移除超时的Buff
foreach (var buff in m_tempBuffList)
{
Log.Debug("移除Buff列表:" + buff.m_Id);
if (buff.m_EffectGo != null)
{
GameObject.Destroy(buff.m_EffectGo);
@ -214,10 +213,11 @@ namespace GameLogic
// 减速也不能减到负数
if (m_AddPush <= 0)
{
m_AddPush = 0;
}
//if (m_AddPush <= 0)
//{
// m_AddPush = 0;
//}
m_AllPush += m_AddPush;
@ -412,10 +412,15 @@ namespace GameLogic
GameObject.Destroy(effectGo);
});
await UniTask.Delay(500); // 等待一段时间再生成下一个特效
}
// 直接扣
m_AllAddPush = m_AllAddPush + (int)buff.addPower;
}
else if (buff.m_Id == 4)
@ -428,11 +433,11 @@ namespace GameLogic
eGo.gameObject.SetActive(true);
eGo.transform.localPosition = new Vector3(-1500, 0, 0);
eGo.transform.DOLocalMoveX(0, 4f).OnComplete(async () =>
{
await UniTask.Delay(2000);
// 特效播放完毕后销毁
GameObject.Destroy(eGo);
});
{
await UniTask.Delay(2000);
// 特效播放完毕后销毁
GameObject.Destroy(eGo);
});
//// 加载常规特效
//LoadEffectGo(giftConfig, buff);
@ -490,6 +495,8 @@ namespace GameLogic
).SetEase(Ease.OutElastic);
});
// 直接扣
m_AllAddPush = m_AllAddPush + (int)buff.addPower;
}
}

View File

@ -382,6 +382,8 @@ namespace GameLogic
// 暂存逻辑
m_PendingGiftActions.Add(() =>
{
Log.Debug(giftConfig.Id);
// 下面原有的逻辑全部放到这里
if (giftConfig.Id == 1)
{
@ -446,6 +448,8 @@ namespace GameLogic
}
}
Log.Debug("???????????");
// 排序
m_TempList.Sort((a, b) =>
{
@ -469,6 +473,9 @@ namespace GameLogic
var item = m_TempList[i];
// 添加减速Buff
Buff m_Buff1 = new Buff();
Log.Debug("减速:" + giftConfig.AddPower * num);
m_Buff1.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num);
item.AddBuff(m_Buff1, unitPlayerData, giftConfig);
@ -631,6 +638,7 @@ namespace GameLogic
var item = m_TempList[i];
// 添加减速Buff
Buff m_Buff1 = new Buff();
Log.Debug("????????" + giftConfig.AddPower * num);
m_Buff1.OnInit(giftConfig.Id, giftConfig.AddPower * num, giftConfig.TimerLen, giftConfig.AddGiftScore, num);
item.AddBuff(m_Buff1, unitPlayerData, giftConfig);