Пример #1
0
    private void Awake()
    {
        Instance      = this;
        _highestScore = PlayerPrefs.GetInt(HighestScorePrefKey, 0);

        OnLevelCompletedEvent.AddListener(OnLevelCompleted);
        OnLevelResultEvent.AddListener(OnLevelResult);
    }
Пример #2
0
 private void OnDestroy()
 {
     OnLevelCompletedEvent.RemoveAllListeners();
     OnOpenLevelsPopUp.RemoveAllListeners();
     OnPlayLevelButtonEvent.RemoveAllListeners();
     OnInitializeLevelEvent.RemoveAllListeners();
     OnLevelResultEvent.RemoveAllListeners();
     OnReturnMainMenu.RemoveAllListeners();
     OnGameHudUpdateEvent.RemoveAllListeners();
 }