Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 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.IsInPointArea(player.position, player.forward, entity.Transform.position, mMinDistance, mMaxDistance,
                                    mViewAngle))
         {
             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);
        }
        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.IsInPointArea(player.position, player.forward, target.position, mMinDistance, mMaxDistance,
                                           mViewAngle))
                {
                    results.Add(target);
                }
            }
            return(results);
        }