Exemplo n.º 1
0
 public void CheckRemove(bool self)
 {
     if (self)
     {
         List <Grid> grids = FindTripletGrids(gridContainer.SelfGrids, true); //横向
         grids.AddRange(FindTripletGrids(gridContainer.SelfGrids, false));    //纵向
         if (grids.Count > 0)
         {
             for (int i = 0; i < grids.Count; i++)
             {
                 gridContainer.SelfGrids.Remove(grids[i]);
                 ///  gridContainer.MoveRock(grids[i].Node.X, 1);
                 UnityEngine.GameObject.Destroy(grids[i].gameObject);
             }
         }
         for (int i = 0; i < GridContainer.MAX_COL; i++)
         {
             gridContainer.UpdateSelfNodes(i);
         }
     }
 }