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

24 lines
705 B
C#

using Gameplay.Area;
using Gameplay.PostProcess.BlackArea;
namespace Gameplay.Buff
{
public class BuffLightUpDuring : BaseBuff
{
protected override void _OnLogicUpdate(float dt)
{
base._OnLogicUpdate(dt);
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, 0.1f);
}
}
}
}