public void SetLayerDepth(float layerDepth) { this.layerDepth = layerDepth; for (int i = 0; i < this.hypercubes.Count; i++) { this.hypercubes[i].LayerDepth = layerDepth + 0.001f * (i + 1); } }