public override List <Point> GetValidTargets(List <Point> board, Point position) { Logcat.I(this, $"NeoSatanHeadScreamAction rapture {raptureRow.Value}"); neoSatanBehaviour = GetComponentInParent <NeoSatanBehaviour>(); this.ValidPositions = base.GetValidTargets(board, position); List <Point> excludingUnits = this.ValidPositions.Where(currentPoint => !this.UnitsMap.Contains(currentPoint)).ToList(); List <Point> excludingLegs = excludingUnits?.Where(p => !neoSatanBehaviour.LegsPositions.Contains(p)).ToList(); List <Point> excludingLatestRows = excludingLegs?.Where(p => p.x > this.raptureRow.Value + this.offset).ToList(); this.ValidPositions = excludingLatestRows; return(this.ValidPositions); }
private void OnEnable() { neoSatanBehaviour = GetComponentInParent <NeoSatanBehaviour>(); }