예제 #1
0
        public bool GetVoxel(VoxelChunk checkFirst, Vector3 worldLocation, ref Voxel newReference)
        {
            if (checkFirst != null)
            {
                if (checkFirst.GetVoxelAtWorldLocation(worldLocation, ref newReference))
                {
                    return(true);
                }
            }

            VoxelChunk chunk = GetVoxelChunkAtWorldLocation(worldLocation);

            if (chunk == null)
            {
                return(false);
            }

            return(chunk.GetVoxelAtValidWorldLocation(worldLocation, ref newReference));
        }