예제 #1
0
 Transform PickPrefab(HexFeatureCollection[] collection, int level, float hash, float choice)
 {
     if (level > 0)
     {
         float[] tresholds = HexMetrics_Script.GetFeatureTresholds(level - 1);
         for (int i = 0; i < tresholds.Length; i++)
         {
             if (hash < tresholds[i])
             {
                 return(collection[i].Pick(choice));
             }
         }
     }
     return(null);
 }