コード例 #1
0
 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;
             }
         }
     }
 }
コード例 #2
0
 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;
             }
         }
     }
 }