コード例 #1
0
ファイル: ChunkColumn.cs プロジェクト: powerus117/VoxelEngine
    private void NotifyNeighbours()
    {
        for (int x = -1; x <= 1; x++)
        {
            for (int z = -1; z <= 1; z++)
            {
                // Current chunk
                if (x == 0 && z == 0)
                {
                    continue;
                }

                ChunkColumn aNeighbourChunk = World.GetColumn(colCoord.GetRelativePos(x, z));

                // If we find a chunk without data, we don't generate
                if (aNeighbourChunk != null)
                {
                    aNeighbourChunk.IncrementNeighbourDataCount();
                }
            }
        }
    }