Esempio n. 1
0
    public void OnDestroyed(string predictionText)
    {
        _predictionText.text = predictionText;
        PlayerPrefs.SetString("LastPrediction", predictionText);

        int currentTries = PlayerPrefs.GetInt("Tries");

        PlayerPrefs.SetInt("Tries", ++currentTries);

        if (PlayerPrefs.GetInt("Tries") >= _maxTries)
        {
            TriesEnded?.Invoke();
        }
        else
        {
            _buttons.ActivateAllButtons();
        }
    }