예제 #1
0
 private void LeftClick()
 {
     if (!checkd)                                 // Если флаг - нажать нельзя
     {
         if (IsBomb == true && revealed == false) // проверяем на подрыв
         {
             Debug.Log("Game Over");
             foreach (CellOperator CO in allCells)
             {
                 CO.RevealMachine();
             }
             for (int i = 0; i < numbersCanvas.transform.childCount; i++)
             {
                 var child = numbersCanvas.transform.GetChild(i).gameObject;
                 if (child != null)
                 {
                     child.SetActive(true);
                 }
             }
             gameManager.GameOverAppears();
         }
         else
         {
             RevealMachine();
         }
         IsVictory();
     }
 }