/// <summary>
        /// On register mediator
        /// </summary>
        public override void OnRegister()
        {
            View.OnLoadSelectLevel += () =>
            {
                PlayerSettingsService.SaveBestScore(PlayerStartsService.Score);
                PlayerSettingsService.HasReturnToSelectLevel = true;
                SceneManager.LoadSceneAsync("MainMenu");
            };

            CompleteLevelSignal.AddListener(() =>
            {
                if (!PlayerStartsService.HasGameOver)
                {
                    View.ShowDialog(PlayerStartsService.Score);
                }
            });
        }
예제 #2
0
 /// <summary>
 /// On register mediator
 /// </summary>
 public override void OnRegister()
 {
     CompleteLevelSignal.AddListener(() => { View.gameObject.SetActive(false); });
     GameOverSignal.AddListener(() => { View.gameObject.SetActive(false); });
     UpdateScoreSignal.AddListener(() => View.UpdateScore(PlayerStartsService.Score));
 }