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); }
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); }