Beispiel #1
0
    protected override void OnGenerateTerrain()
    {
        Chunk.Coords c = chunk.coords;
        heightmap = heightmapNoise.GetTiledMap(c.x, c.y, width, height);
        alphamap  = data.GetAlphamaps(0, 0, width, height);

        SetupSplats();
        SetupTrees();

        for (int y = 0; y < height; y++)
        {
            for (int x = 0; x < width; x++)
            {
                float h = heightmap[y, x];
                PaintTexture(x, y, h);
                PlaceTree(x, y, h);
            }
        }
    }
Beispiel #2
0
 protected override void GenerateHeightmap()
 {
     Chunk.Coords c = chunk.coords;
     heightmap = noise.GetTiledMap(c.x, c.y, width, height);
 }