Пример #1
0
        public void Initialize()
        {
            _restartButton.OnClickAsObservable()
            .Subscribe(_ => OnRestartClicked())
            .AddTo(Disposer);

            _goToSettingsButton.OnClickAsObservable()
            .Subscribe(_ => OnGoToSettingsClicked())
            .AddTo(Disposer);

            _goToTitleButton.OnClickAsObservable()
            .Subscribe(_ => OnGoToTitleClicked())
            .AddTo(Disposer);

            OnOpened
            .Subscribe(_ => _gameRoundStateController.PauseRound(true))
            .AddTo(Disposer);

            OnClosed
            .Subscribe(_ => _gameRoundStateController.PauseRound(false))
            .AddTo(Disposer);

            Localize();
        }
Пример #2
0
        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();
        }