Exemple #1
0
    public void GenerateMap()
    {
        float[,] noiseMap = Noise.GeneratNoiseMap(mapWidth, mapHeight, seed, noiseScale, octaves, persistance, lacunarity, offset);

        MapDisplay display = FindObjectOfType <MapDisplay>();

        display.DrawNoiseMap(noiseMap);
    }
    public void GenerateMap()
    {
        float[,] noiseMap = Noise.GeneratNoiseMap(mapWidth, mapHeight, seed, noiseScale, octives, persistance, lacunarity, offset);

        GenerateMap display = FindObjectOfType <GenerateMap>();

        if (drawMode == DrawState.NOISEMAP)
        {
            display.DrawNoiseMap(noiseMap);
        }
        else if (drawMode == DrawState.MESH)
        {
            display.DrawMesh(MeshGenerator.GenerateTerrainMesh(noiseMap, meshHeightMultiplyer));
        }
    }