Пример #1
0
 private Transform PickPrefab(HexFeatureCollection[] collection, int level, float hash, float choice)
 {
     if (level > 0)
     {
         float[] thresholds = HexMetrics.GetFeatureThresholds(level - 1);
         for (int i = 0; i < thresholds.Length; i++)
         {
             if (hash < thresholds[i])
             {
                 return(collection[i].Pick(choice));
             }
         }
     }
     return(null);
 }