示例#1
0
    public void DrawMap()
    {
        heightMap = Noise.GenerateNoiseMap(mapWidth, mapHeight, mapSettings.noiseSetting);

        if (display != null)
        {
            if (drawMode == DrawMode.Noise)
            {
                display.DrawTexture(TextureGenerator.TextureFromHeightMap(heightMap));
            }
            else if (drawMode == DrawMode.Color)
            {
                colorMap = ColorMapGenerator.GenerateColorMap(heightMap, regions, mapSettings.useFalloff);

                display.DrawTexture(TextureGenerator.TextureFromColorMap(colorMap, mapWidth, mapHeight));
            }
            else if (drawMode == DrawMode.FallOff)
            {
                display.DrawTexture(TextureGenerator.TextureFromHeightMap(FalloffMap));
            }
        }
    }
示例#2
0
 public void GenerateMap()
 {
     falloffMap = Falloff.GenerateFalloffMap(mapWidth, mapHeight);
     DrawMap();
     colorMap = ColorMapGenerator.GenerateColorMap(heightMap, regions, mapSettings.useFalloff);
 }