Exemplo n.º 1
0
 void ClearLine(int height)
 {
     for (var width = 0; width < grids.GetLength(0); width++)
     {
         var b = grids[width, height];
         if (b != null)
         {
             grids[width, height] = null;
             blockInstanceManager.EndUseBlock(b);
         }
     }
 }
Exemplo n.º 2
0
 public void RemoveAllBlocks()
 {
     if (blocks != null)
     {
         for (var i = 0; i < blocks.Length; i++)
         {
             if (instanceManager)
             {
                 instanceManager.EndUseBlock(blocks[i]);
             }
             else
             {
                 Debug.LogWarning("trying to remove all blocks, but instanceManager = null");
                 GameObject.Destroy(blocks[i]);
             }
         }
         blocks = null;
     }
 }