Пример #1
0
 private void Awake()
 {
     comparison = delegate(Planet a, Planet b) {
         if (a && b)
         {
             return(Vector2.SqrMagnitude(player.transform.position - a.transform.position)
                    .CompareTo(Vector2.SqrMagnitude(player.transform.position - b.transform.position)));
         }
         else
         {
             if (a)
             {
                 return(1);
             }
             else if (b)
             {
                 return(-1);
             }
             else
             {
                 return(0);
             }
         }
     };
     turnOnDist   *= turnOnDist;
     nearbyPlanets = player.GetComponentInChildren <PlanetRadar>().planetsNearby;
     StartCoroutine(OrderList());
 }