public void OnExitButtonClicked() { if (_loading != null) { return; } if (_gameController.QuickExit()) { _gameController.Finish(); _loading = SceneManager.LoadSceneAsync(Scenes.MainMenu); _animator.Play(UIAnimations.RightClosing); _loading.allowSceneActivation = false; } else { if (_gameController is IStorable) { _exitWindowWithSaving.Open(); } else { _simpleExitWindow.Open(); } } }
public void OnUpgradesButtonClicked() { settingsWindow.Close(); if (upgradesWindow.isOpen()) { upgradesWindow.Close(); EventManager.onGameResumed.Invoke(); } else { EventManager.onGamePaused.Invoke(); upgradesWindow.Open(); } }