Example #1
0
    protected virtual void Generate()
    {
        GetData();
        LoadTiles();

        UpdateNeighbours();

        GenerateRivers();
        BuildRiverGroups();
        DigRiverGroups();
        AdjustMoistureMap();

        UpdateBitmasks();
        FloodFill();

        GenerateBiomeMap();
        UpdateBiomeBitmasks();

        heightMapRenderer.materials [0].mainTexture   = TextureGenerator.GenerateHeightMapTexture(width, height, tiles);
        heatMapRenderer.materials [0].mainTexture     = TextureGenerator.GenerateHeatMapTexture(width, height, tiles);
        moistureMapRenderer.materials [0].mainTexture = TextureGenerator.GenerateMoistureMapTexture(width, height, tiles);
        biomeMapRenderer.materials [0].mainTexture    = TextureGenerator.GenerateBiomeMapTexture(width, height, tiles, coldestValue, colderValue, coldValue);
    }