// Token: 0x060028FD RID: 10493 RVA: 0x000FA288 File Offset: 0x000F8688
 public static void getResourcesInRadius(Vector3 center, float sqrRadius, List <RegionCoordinate> search, List <Transform> result)
 {
     if (ResourceManager.regions == null)
     {
         return;
     }
     for (int i = 0; i < search.Count; i++)
     {
         RegionCoordinate regionCoordinate = search[i];
         if (ResourceManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y] != null)
         {
             for (int j = 0; j < LevelGround.trees[(int)regionCoordinate.x, (int)regionCoordinate.y].Count; j++)
             {
                 ResourceSpawnpoint resourceSpawnpoint = LevelGround.trees[(int)regionCoordinate.x, (int)regionCoordinate.y][j];
                 if (!(resourceSpawnpoint.model == null) && !resourceSpawnpoint.isDead)
                 {
                     if ((resourceSpawnpoint.point - center).sqrMagnitude < sqrRadius)
                     {
                         result.Add(resourceSpawnpoint.model);
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 // Token: 0x060028CE RID: 10446 RVA: 0x000F8024 File Offset: 0x000F6424
 public static void getObjectsInRadius(Vector3 center, float sqrRadius, List <RegionCoordinate> search, List <Transform> result)
 {
     if (LevelObjects.objects == null)
     {
         return;
     }
     for (int i = 0; i < search.Count; i++)
     {
         RegionCoordinate regionCoordinate = search[i];
         if (LevelObjects.objects[(int)regionCoordinate.x, (int)regionCoordinate.y] != null)
         {
             for (int j = 0; j < LevelObjects.objects[(int)regionCoordinate.x, (int)regionCoordinate.y].Count; j++)
             {
                 LevelObject levelObject = LevelObjects.objects[(int)regionCoordinate.x, (int)regionCoordinate.y][j];
                 if (!(levelObject.transform == null))
                 {
                     if ((levelObject.transform.position - center).sqrMagnitude < sqrRadius)
                     {
                         result.Add(levelObject.transform);
                     }
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 public static void getStructuresInRadius(Vector3 center, float sqrRadius, List <RegionCoordinate> search, List <Transform> result)
 {
     if (StructureManager.regions == null)
     {
         return;
     }
     for (int i = 0; i < search.Count; i++)
     {
         RegionCoordinate regionCoordinate = search[i];
         if (StructureManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y] != null)
         {
             for (int j = 0; j < StructureManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y].drops.Count; j++)
             {
                 Transform model = StructureManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y].drops[j].model;
                 if ((model.position - center).sqrMagnitude < sqrRadius)
                 {
                     result.Add(model);
                 }
             }
         }
     }
 }
Ejemplo n.º 4
0
 // Token: 0x0600283D RID: 10301 RVA: 0x000F35E4 File Offset: 0x000F19E4
 public static void getItemsInRadius(Vector3 center, float sqrRadius, List <RegionCoordinate> search, List <InteractableItem> result)
 {
     if (ItemManager.regions == null)
     {
         return;
     }
     for (int i = 0; i < search.Count; i++)
     {
         RegionCoordinate regionCoordinate = search[i];
         if (ItemManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y] != null)
         {
             for (int j = 0; j < ItemManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y].drops.Count; j++)
             {
                 ItemDrop itemDrop = ItemManager.regions[(int)regionCoordinate.x, (int)regionCoordinate.y].drops[j];
                 if ((itemDrop.model.position - center).sqrMagnitude < sqrRadius)
                 {
                     result.Add(itemDrop.interactableItem);
                 }
             }
         }
     }
 }