コード例 #1
0
ファイル: MainController.cs プロジェクト: Injection735/racing
    public MainController(Transform placeForUi, ProfilePlayer profilePlayer,
                          DailyRewardView dailyRewardView, CurrencyView currencyView,
                          FightWindowView fightWindowView, StartFightView startFightView)
    {
        _profilePlayer   = profilePlayer;
        _placeForUi      = placeForUi;
        _dailyRewardView = dailyRewardView;
        _currencyView    = currencyView;
        _fightWindowView = fightWindowView;
        _startFightView  = startFightView;

        OnChangeGameState(_profilePlayer.CurrentState.Value);
        profilePlayer.CurrentState.SubscribeOnChange(OnChangeGameState);
    }
コード例 #2
0
    public FightWindowController(Transform placeForUi, FightWindowView fightWindowView, ProfilePlayer profilePlayer)
    {
        _profilePlayer = profilePlayer;

        _fightWindowViewInstance = GameObject.Instantiate(fightWindowView, placeForUi);
    }