Ejemplo n.º 1
0
 public TitleUseCase(TitlePresenter presenter, StageSelectPresenter stageSelectPresenter, Action <int> onChangeRace)
 {
     _presenter          = presenter;
     _stageSelectUseCase = new StageSelectUseCase(stageSelectPresenter, OnChangeRace);
     _onChangeRace       = onChangeRace;
     _presenter.RegisterGoRaceButton(OnOpenStageSelect);
 }
Ejemplo n.º 2
0
        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);
        }