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); }
public StartFightController(Transform placeForUi, StartFightView startFightView, ProfilePlayer profilePlayer) { _profilePlayer = profilePlayer; _startFightViewInstance = GameObject.Instantiate(startFightView, placeForUi); }