Пример #1
0
 public TitleUseCase(TitlePresenter presenter, StageSelectPresenter stageSelectPresenter, Action <int> onChangeRace)
 {
     _presenter          = presenter;
     _stageSelectUseCase = new StageSelectUseCase(stageSelectPresenter, OnChangeRace);
     _onChangeRace       = onChangeRace;
     _presenter.RegisterGoRaceButton(OnOpenStageSelect);
 }
        public StageSelectUseCase(StageSelectPresenter presenter, Action <int> onChangeRace)
        {
            _presenter = presenter;

            var owner = PlayerRepository.I.GetOwner();

            if (owner == null)
            {
                owner = new PlayerModel();
                PlayerRepository.I.Save(owner);
            }

            _presenter.ActiveRaceSelectButtons(owner.RaceLevel);
            _presenter.RegisterRaceSelectButton(onChangeRace);
            _presenter.RegisterCloseButton(Close);
        }