Beispiel #1
0
    public MapChunk generateInitial(int width, int height)
    {
        BaseTilesGenerator baseGenerator = new BaseTilesGenerator();

        int [,] baseTiles = baseGenerator.Generate(width, height);

        SmoothTilesGenerator smoothGenerator = new SmoothTilesGenerator();

        int [,] smoothTiles = smoothGenerator.Generate(baseTiles, width, height);

        FinalTilesGenerator finalGenerator = new FinalTilesGenerator();

        int [,] finalTiles = finalGenerator.Generate(smoothTiles, width, height);

        return(new MapChunk(baseTiles, smoothTiles, finalTiles, 0, 0, Random.state));
    }
Beispiel #2
0
    private MapChunk generateFromInitTiles(int [,] initTiles, int x, int y, int width, int height)
    {
        BaseTilesGenerator baseGenerator = new BaseTilesGenerator();

        int [,] baseTiles = baseGenerator.Generate(width, height, initTiles);

        SmoothTilesGenerator smoothGenerator = new SmoothTilesGenerator();

        int [,] smoothTiles = smoothGenerator.Generate(baseTiles, width, height);

        FinalTilesGenerator finalGenerator = new FinalTilesGenerator();

        int [,] finalTiles = finalGenerator.Generate(smoothTiles, width, height);

        return(new MapChunk(baseTiles, smoothTiles, finalTiles, 0, 0, Random.state));
    }