public MainController(Transform placeForUi, ProfilePlayer profilePlayer, UnityAdsTools adsTools) { _profilePlayer = profilePlayer; _placeForUi = placeForUi; _unityAdsTools = adsTools; OnChangeGameState(_profilePlayer.CurrentState.Value); profilePlayer.CurrentState.SubscribeOnChange(OnChangeGameState); }
public MainMenuController(Transform placeForUi, ProfilePlayer profilePlayer, UnityAdsTools unityAdsTools) { _profilePlayer = profilePlayer; _unityAdsTools = unityAdsTools; _view = LoadView(placeForUi); _view.Init(StartGame, EnterGarage); _mainMenuTrailController = new MainMenuTrailController(); AddController(_mainMenuTrailController); _shedController = ConfigureShedController(placeForUi, profilePlayer); AddController(_shedController); }