Exemplo n.º 1
0
        /// <summary>
        /// On register mediator
        /// </summary>
        public override void OnRegister()
        {
            View.OnLoadMainMenu += () => { OnLoadMainMenuSignal.Dispatch(); };
            View.OnLoadMainGame += level =>
            {
                PlayerSettingsService.UpdateCurrentLevel(level);
                SceneManager.LoadScene("MainGame");
            };

            OnLoadSelectLevelSignal.AddListener(() => { View.ShowContent(); });
        }
Exemplo n.º 2
0
        /// <summary>
        /// On register mediator
        /// </summary>
        public override void OnRegister()
        {
            View.OnLoadMainMenu += () => { OnLoadMainMenuSignal.Dispatch(); };
            View.OnLoadMainGame += level =>
            {
                PlayerSettingsService.CurrentLevel = level;
                LoadGameScene();
            };

            OnLoadSelectLevelSignal.AddListener(() =>
            {
                View.ShowContent();
                LevelsManager.InitLevels();
            });
        }
Exemplo n.º 3
0
        /// <summary>
        /// On register mediator
        /// </summary>
        public override void OnRegister()
        {
            OnLoadSettingsSignal.AddListener(() => { View.ShowContent(); });

            View.OnInitVolume += slider =>
            {
                var volume = PlayerSettingsService.InitVolume();
                slider.value = volume;
                OnChangeVolumeSignal.Dispatch(volume);
            };

            View.OnChangeVolume += volume =>
            {
                PlayerSettingsService.UpdateVolume(volume);
                OnChangeVolumeSignal.Dispatch(volume);
            };

            View.OnLoadMainMenu += () => { OnLoadMainMenuSignal.Dispatch(); };
        }