示例#1
0
    public void BuildNextColumn()
    {
        ColumnCoord currentViewedColumnCoord = columnsToBuild[0];

        columnsToBuild.RemoveAt(0);
        GameObject newColumn = Instantiate(columnPrefab, new Vector3(currentViewedColumnCoord.x * ChunkColumn.chunkSize * ChunkColumn.blockSize, 0, currentViewedColumnCoord.z * ChunkColumn.chunkSize * ChunkColumn.blockSize), Quaternion.identity);

        newColumn.transform.parent = transform;
        newColumn.name             = "aChunkColumn " + currentViewedColumnCoord.x + " " + currentViewedColumnCoord.z;
        ChunkColumn chunkColScript = newColumn.GetComponent <ChunkColumn>();

        columns.Add(currentViewedColumnCoord, chunkColScript);
        chunkColScript.Init(currentViewedColumnCoord);
        chunkColScript.StartGenerating();
    }