예제 #1
0
 private void OnLeftClick(CellController cell)
 {
     if (Board.Mode == GameMode.Playing)
     {
         Board.LeftClick(cell.I, cell.J);
         UpdateCells(cell.I, cell.J);
         Text countFlag = Flags.GetComponent <Text>();
         countFlag.text = "" + Board.NumFlags;
     }
 }
예제 #2
0
 private void OnRightClick(CellController cell)
 {
     if (Board.Mode == GameMode.Playing)
     {
         Board.RightClick(cell.I, cell.J);
         Cell cel = Board.Cells[cell.I, cell.J];
         if (cel.Mode == CellMode.Flaged)
         {
             Cells[cell.I, cell.J].Redraw(CellView.Flag);
         }
         if (cel.Mode == CellMode.Closed)
         {
             Cells[cell.I, cell.J].Redraw(CellView.Tile);
         }
         Text countFlag = Flags.GetComponent <Text>();
         countFlag.text = "" + Board.NumFlags;
     }
 }