Exemplo n.º 1
0
 private void OnApplicationQuit()
 {
     //ДОБАВИТЬ ПРОВЕРКУ НА ПРОИГРЫШ!!!!
     if (!lost)
     {
         SaveController.Save(SaveKey, field, currentScore, lastNumber);
     }
     else
     {
         SaveController.ClearSave(SaveKey);
     }
 }
Exemplo n.º 2
0
    public void Restart()
    {
        GameLogic.Replay(fieldVis, field, Max, Min, ref lastNumber);

        Debug.Log("START NUMBER" + lastNumber);
        currentScore = 0;
        Score.text   = "0";
        lost         = false;
        SaveController.ClearSave(SaveKey);

        if (LostPanel.gameObject.activeSelf)
        {
            LostPanel.gameObject.SetActive(false);
        }
    }