Пример #1
0
    private void DrawQuads(Block block)
    {
        if (block.IsSolid() == false)
        {
            return;
        }

        foreach (Vector3 direction in Block.directions)
        {
            GameObject quad = QuadUtils.CreateQuad(block, direction);
            quad.transform.parent = transform;
        }
    }
Пример #2
0
    void DrawQuads(int x, int y, int z, Chunk chunk, GameObject gameObject)
    {
        if (chunk.blocks[x, y, z].IsSolid() == false)
        {
            return;
        }

        foreach (Vector3 direction in Block.directions)
        {
            if (!chunk.HasSolidNeighbor(x, y, z, direction))
            {
                GameObject quad = QuadUtils.CreateQuad(chunk.blocks[x, y, z], direction);
                quad.transform.parent = gameObject.transform;
            }
        }
    }