29 lines
890 B
C#
29 lines
890 B
C#
using AOT.PostProcess.BlackArea;
|
|
using Gameplay.Area;
|
|
using Gameplay.Common;
|
|
using Gameplay.PostProcess.BlackArea;
|
|
namespace Gameplay.Buff
|
|
{
|
|
public class BuffLightUpDuring : BaseBuff
|
|
{
|
|
|
|
protected override void _OnLogicUpdate(float dt)
|
|
{
|
|
base._OnLogicUpdate(dt);
|
|
|
|
if (!owner.statusData.isOnFloor) return;
|
|
if (owner.statusData.isDead) return;
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|