Ejemplo n.º 1
0
 public void Initialize(
     OnegaiRepository onegaiRepository,
     IPlayerOnegaiRepository playerOnegaiRepository,
     IMonoInfoRepository monoInfoRepository,
     IPlayerMonoInfoRepository playerMonoInfoRepository,
     IMousePurchaceTableRepository mousePurchaceTableRepository,
     IPlayerMouseStockRepository playerMouseStockRepository
     )
 {
     this.monoTabPresenter.Initialize(playerMonoInfoRepository);
     this.arrangementMenuUIPresenter.Initialize(playerOnegaiRepository);
     this.fieldActionUIPresenter.Initialize();
     this.satisfactionPresenter.Initialize(playerOnegaiRepository);
     this.conversationPresenter.Initialize();
     this.rewardPresenter.Initialize();
     this.onegaiPresenter.Initialize(playerOnegaiRepository);
     this.onegaiDetailPresenter.Initialize();
     this.rewardOnegaiPresenter.Initialize(playerOnegaiRepository);
     this.rewardMonoInfoPresenter.Initialize(monoInfoRepository);
     this.commonPresenter.Initialize();
     this.monoDetailPresenter.Initialize();
     this.mousePurchasePresenter.Initialize(mousePurchaceTableRepository, playerMouseStockRepository);
     this.toolBarmanager.Initialize();
     this.dailyEndPresenter.Initialize();
     this.dailyStartPresenter.Initialize();
     this.onegaiConditionNotificationPresenter.Initialize();
     this.imagePresenter.Initialize();
     this.arrangementModeUIPresenter.Initialize();
     this.selectModeUIPresenter.Initialize();
 }
Ejemplo n.º 2
0
        public void Initialize(IMousePurchaceTableRepository mousePurchaceTableRepository, IPlayerMouseStockRepository playerMouseStockRepository)
        {
            this.mousePurchaceTableRepository = mousePurchaceTableRepository;
            this.playerMouseStockRepository   = playerMouseStockRepository;

            this.mousePurchaseView.Initialize();
            this.disposables.Add(this.mousePurchaseView.OnClose.Subscribe(_ => {
                this.Close();
            }));
            this.disposables.Add(this.mousePurchaseView.OnPurchace.Subscribe(_ => {
                var mousePurchaceTableModel = this.mousePurchaceTableRepository.Get((uint)(FetchCurrentCount().Value + 1));
                var amount = mousePurchaceTableModel.GetMousePurchaseResourceAmount();
                if (MousePurchaseResourceHelper.IsConsume(amount))
                {
                    // 素材を消費
                    MousePurchaseResourceHelper.Consume(amount);

                    // ネズミの数を増やす
                    this.IncrementMouseStockCount();

                    // 見た目を変更する
                    this.UpdateView();
                }
            }));
            this.Close();
        }