Ejemplo n.º 1
0
 public void GenerateMap2D()
 {
     worldRenderer.ClearPerlind2DTilemap();
     for (int x = -1 * mapLength; x < mapLength; x++)
     {
         for (int y = perlin2DData.noiseRangeMin; y < perlin2DData.noiseRangeMax; y++)
         {
             var noise = SumNoise(perlin2DData.offset.x + x, y, perlin2DData);
             if (noise > noiseThresholdMin && noise < noiseThresholdMax)
             {
                 worldRenderer.SetPerlin2d(x, y, blockData.perlin2D);
             }
         }
     }
 }