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() 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) foreach (var item in m_Buffs)
{ {
@ -191,7 +191,6 @@ namespace GameLogic
// 移除超时的Buff // 移除超时的Buff
foreach (var buff in m_tempBuffList) foreach (var buff in m_tempBuffList)
{ {
Log.Debug("移除Buff列表:" + buff.m_Id);
if (buff.m_EffectGo != null) if (buff.m_EffectGo != null)
{ {
GameObject.Destroy(buff.m_EffectGo); GameObject.Destroy(buff.m_EffectGo);
@ -214,10 +213,11 @@ namespace GameLogic
// 减速也不能减到负数 // 减速也不能减到负数
if (m_AddPush <= 0) //if (m_AddPush <= 0)
{ //{
m_AddPush = 0; // m_AddPush = 0;
} //}
m_AllPush += m_AddPush; m_AllPush += m_AddPush;
@ -412,10 +412,15 @@ namespace GameLogic
GameObject.Destroy(effectGo); GameObject.Destroy(effectGo);
}); });
await UniTask.Delay(500); // 等待一段时间再生成下一个特效 await UniTask.Delay(500); // 等待一段时间再生成下一个特效
} }
// 直接扣
m_AllAddPush = m_AllAddPush + (int)buff.addPower;
} }
else if (buff.m_Id == 4) else if (buff.m_Id == 4)
@ -490,6 +495,8 @@ namespace GameLogic
).SetEase(Ease.OutElastic); ).SetEase(Ease.OutElastic);
}); });
// 直接扣
m_AllAddPush = m_AllAddPush + (int)buff.addPower;
} }
} }

View File

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