private void OnMistaken() { ChangeValue(_currentValue - 1); if (_currentValue == 0) { TriesEnded?.Invoke(); } }
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(); } }