ManicDigger.InfiniteHeightCache.GetChunk C# (CSharp) Method

GetChunk() public method

public GetChunk ( int x, int y ) : ].byte[
x int
y int
return ].byte[
        public byte[,] GetChunk(int x, int y)
        {
            byte[,] chunk = null;
            var k = new Point(x / chunksize, y / chunksize);
            if (!gencache.TryGetValue(k, out chunk))
            {
                chunk = new byte[chunksize, chunksize];
                gencache[k] = chunk;
            }
            return chunk;
        }