void GameCompleted()
    {
        OnGameCompleted?.Invoke(this);
        IsPlaying = false;
        float Highscore = GetTopScore();

        if (Score > Highscore)
        {
            PlayerPrefs.SetFloat($"{ModeName}:highscore", Score);
        }
    }
Пример #2
0
 public void OnDisable()
 {
     OnTurnOffMiniGame?.Invoke(MiniGameResult);
     OnGameCompleted?.Invoke(MiniGameResult);
     GameManager.Instance?.EnablePlayerControl();
 }