コード例 #1
0
    public void init()
    {
        int[,] chunkTileIDs;
        int[,] backgroundTileIDs;
        // get the chunk data from the terrain generator class and set the tilemap to it
        chunkTileIDs = TerrainGeneration.generateChunkTiles(chunkX, chunkY, seed, biomeRefrence.biome, out backgroundTileIDs);
        setTileToIdArray(chunkTileIDs);


        // create the chunk background object
        createChunkBackground();

        // set the backgrounds tiles correctly based on our tile id
        chunkBackground.setTileToIdArray(backgroundTileIDs);
    }