Ejemplo n.º 1
0
 private List <SpawnableEntityChance> GetPrefabs(float distance)
 {
     cachedChances.Clear();
     for (int i = 0; i < Prefabs.Count; i++)
     {
         SpawnableEntity se = Prefabs[i];
         if (se.ignore)
         {
             continue;
         }
         float chance = se.GetChance(distance);
         if (chance == 0f)
         {
             continue;
         }
         cachedChances.Add(new SpawnableEntityChance(se, chance));
     }
     return(cachedChances);
 }