using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Gameplay.Summon { using Framework; using Gameplay.Area; using Gameplay.Bullet; using Gameplay.Common; using Gameplay.Skill; using LTGame; public class SummonStateMineBoom : BaseSummonState { private readonly SummonMine _mine; public SummonStateMineBoom(SummonMine owner) : base(owner, ESummonState.MineBoom) { _mine = owner; } protected override void _OnEnter(NBaseState exitState, object param) { base._OnEnter(exitState, param); isFinished = true; nextState = ESummonState.WaitRemove; var bulletId = _mine.emitBulletId; var areaId = _mine.areaId; // 根据作用区域筛选目标 var selectIndexs = AreaManager.instance.GetCellIndexs(owner.transData.cellIndex, areaId); for (var i = 0; i < selectIndexs.Count; ++i) { var cellIndex = selectIndexs[i]; BulletManager.instance.EmitBullet(bulletId, cellIndex, _mine); } } } }