NLDClient-yudde/ProjectNLD/Assets/Code/Scripts/Gameplay/Buff/Impl/BuffLightUpDuring.cs

29 lines
891 B
C#
Raw Normal View History

using AOT.PostProcess.BlackArea;
using Gameplay.Area;
using Gameplay.Common;
2024-07-12 13:07:36 +08:00
using Gameplay.PostProcess.BlackArea;
namespace Gameplay.Buff
{
public class BuffLightUpDuring : BaseBuff
{
protected override void _OnLogicUpdate(float dt)
{
base._OnLogicUpdate(dt);
if (owner.statusData.isOnVehicle) return;
if (owner.statusData.isDead) return;
2024-07-12 13:07:36 +08:00
var centerCellIndex = owner.transData.cellIndex;
var lightUpDistance = _TryGetIntParam(0);
var allCellIndex = AreaManager.instance.GetCellIndexsAround(centerCellIndex, lightUpDistance);
for (int i = 0; i < allCellIndex.Count; i++)
{
var cellIndex = allCellIndex[i];
BlackAreaManager.instance.LightUpCell(cellIndex, CodeDefine.Fight.LIGHT_UP_TIME);
2024-07-12 13:07:36 +08:00
}
}
}
}