Ejemplo n.º 1
0
        private void DrawHitChunkBounds(ChunkBounds cb)
        {
            var c = Handles.color;

            Handles.color = Color.green;
            Handles.DrawWireCube(cb.bounds.center, cb.bounds.size);
            Handles.color = c;
        }
Ejemplo n.º 2
0
        private List <BlockBounds> CreateActiveChunkBlocksBounds(ChunkBounds activeChunkBounds)
        {
            var start = activeChunkBounds.bounds.center;

            start.x = start.x - 8;
            start.z = start.z - 8;

            var blocksBounds = new List <BlockBounds>();

            for (int j = 0; j < 16; j++)
            {
                for (int i = 0; i < 16; i++)
                {
                    var b = new Bounds();
                    b.center = new Vector3(start.x + i + 0.5f, start.y, start.z + j + 0.5f);
                    b.size   = new Vector3(1, 1, 1);
                    blocksBounds.Add(new BlockBounds(i, 0, j, b));
                }
            }
            return(blocksBounds);
        }