private void SetPlaneBlock() { for (int i = 0; i < axisIndex; i++) //axisIndex: 0 == x, 1 == y, 2 == z { for (int j = 0; j < BlockSize; j++) { for (int k = 0; k < BlockSize; k++) { GameObject block = Instantiate(planeBlock) as GameObject; PlaneBlock planeblock = block.GetComponent <PlaneBlock>(); planeblock.Initialize(i, j, k); blockArray[i, j, k] = planeblock; } } } }
private void SetPlaneBlock(int blockSize) { for (int i = 0; i < _axisIndex; i++) { for (int j = 0; j < blockSize; j++) { for (int k = 0; k < blockSize; k++) { GameObject block = Instantiate(planeBlock) as GameObject; PlaneBlock planeblock = block.GetComponent <PlaneBlock>(); planeblock.Initialize(i, j, k); planeArray[i, j, k] = planeblock; } } } }