예제 #1
0
 private void OnDisable()
 {
     currentState = GameState.starting;
     for (int i = 0; i < width; i++)
     {
         for (int j = 0; j < height; j++)
         {
             if (tiles[i, j] != null)
             {
                 Destroy(tiles[i, j]);
                 tiles[i, j] = null;
             }
         }
     }
     hint.RestartTimer();
     hint.ClearPossibleMovesList();
     if (menu.restartBtn)
     {
         menu.restartBtn.gameObject.SetActive(true);
     }
     if (menu.gameOverTMP)
     {
         menu.gameOverTMP.gameObject.SetActive(true);
     }
     if (timer)
     {
         timer.enabled = false;
     }
     if (scoreTMP)
     {
         scoreTMP.enabled = false;
     }
 }