private void NextStage()
        {
            Messenger.RemoveListener(Signals.TargetOut(), NextStage);

            int             newStage    = _stage + 1;
            GameResultModel resultModel = new GameResultModel(newStage, true);

            Messenger.Broadcast <IGameResultModel>(Signals.GameResult(), resultModel);

            StartGame(newStage);
        }
        private void Restart()
        {
            Messenger.RemoveListener(Signals.TargetOut(), Restart);

            int             newStage    = 0;
            GameResultModel resultModel = new GameResultModel(newStage, false);

            Messenger.Broadcast <IGameResultModel>(Signals.GameResult(), resultModel);

            StartGame();
        }
예제 #3
0
        public void Initialize(ITargetControllerSettings settings)
        {
            _settings             = settings;
            _currentSettingsModel = 0;

            transform.position = _settings.Position;

            _view.Hide();

            Messenger.AddListener(Signals.GameStartPhase(), OnGameStart);
            Messenger.AddListener <bool>(Signals.GameResultPhase(), OnGameResultPhase);
            Messenger.AddListener <IGameResultModel>(Signals.GameResult(), OnGameResult);
        }
 private void Awake()
 {
     _view.SetIndicator();
     Messenger.AddListener <IGameResultModel>(Signals.GameResult(), OnGameResult);
 }