Exemplo n.º 1
0
 private GameObject getIdleMover(route route)
 {
     GameObject[] movers = GameObject.FindGameObjectsWithTag("mover");
     try {
         GameObject result = harvestableRessource.GetClosestMover(movers, true, route.getTarget().transform).gameObject;
         return(result);
     } catch (NullReferenceException ex) {
         return(null);
     }
 }
Exemplo n.º 2
0
 private void checkDestroyed(route route)
 {
     if (route.getOrigin() == null || route.getTarget() == null)
     {
         if (route is routeSolotype)
         {
             routes.Remove((routeSolotype)route);
         }
         else
         {
             routesAllType.Remove((routeAllType)route);
         }
     }
 }