Esempio n. 1
0
    public mBlock GetBlock(float x, float y, float z)
    {
        if (x >= Size || y >= Size || z >= Size || x < 0 || y < 0 || z < 0)
        {
            return(new mBlock(false));
        }
        mBlock block = blocks[(int)x, (int)y, (int)z];

        return(block);
    }
Esempio n. 2
0
    public Color GetBlockColor(float x, float y, float z)
    {
        mBlock b = GetBlock(x, y, z);

        if (b.solid)
        {
            return(new Color(b.r, b.g, b.b));
        }

        return(Color.white);
    }