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 FightWindowController(Transform placeForUi, FightWindowView fightWindowView, ProfilePlayer profilePlayer) { _profilePlayer = profilePlayer; _fightWindowViewInstance = GameObject.Instantiate(fightWindowView, placeForUi); }