public void Initialize() { _gameRoundStateModel.OnRoundEnded .Subscribe(_ => OnRoundEnded()) .AddTo(Disposer); OnOpened .Subscribe(_ => _gameRoundStateController.PauseRound(true)) .AddTo(Disposer); _restartButton.OnClickAsObservable() .Subscribe(_ => _sceneManagementController.ToGame()) .AddTo(Disposer); _goToMenuButton.OnClickAsObservable() .Subscribe(_ => _sceneManagementController.ToTitle()) .AddTo(Disposer); Localize(); }
private void SwitchLanguageTo(Language language) { TextService.SetLanguage(language); _sceneManagementController.ToTitle(); }
private void OnGoToTitleClicked() { _sceneManagementController.ToTitle(); }