public override LinkedList <MYXZEntity> Pick(Transform player, IEnumerable <MYXZEntity> targets) { if (targets == null) { return(null); } this.Targets.Clear(); foreach (MYXZEntity entity in targets) { if (MYXZMath.IsInRectArea(player.position, player.forward, entity.Transform.position, this.m_width, this.m_length)) { this.Targets.AddFirst(entity); } } return(this.Targets); }
public override List <Transform> Pick(Transform player, List <Transform> targets) { if (targets == null) { return(null); } List <Transform> results = new List <Transform>(); foreach (Transform target in targets) { if (MYXZMath.IsInRectArea(player.position, player.forward, target.position, this.mWidth, this.mLength)) { results.Add(target); } } return(results); }