protected override void OnViewLoaded(AsyncOperationHandle <GameObject> handle) { base.OnViewLoaded(handle); _view = Object.Instantiate(handle.Result, _placeForUi).GetComponent <MainMenuView>(); AddGameObjects(_view.gameObject); _view.Init(OnStateChanged); }
public MainMenuController(Transform placeForUi, ProfilePlayer profilePlayer) { _profilePlayer = profilePlayer; _view = ResourceLoader.LoadAndInstantiateObject <MainMenuView>( new ResourcePath { PathResource = "Prefabs/mainMenu" }, placeForUi, false); AddGameObjects(_view.gameObject); InitButtons(); var cursorTrailController = ConfigureCursorTrail(); }
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); }
public MainMenuController(Transform placeForUi, ProfilePlayer profilePlayer) { _profilePlayer = profilePlayer; _view = ResourceLoader.LoadAndInstantiateObject <MainMenuView>(new ResourcePath { PathResource = "Prefabs/MainMenu" }, placeForUi, false); AddGameObjects(_view.gameObject); _view.Init(StartGame, DailyRewardGame); // можно внедрить как зависимость для другого контроллера var cursorTrailController = ConfigureCursorTrail(); _shedController = ConfigureShedController(placeForUi, profilePlayer); _shedController.Enter(); }
public MainMenuController(Transform placeForUi, ProfilePlayer profilePlayer) { _profilePlayer = profilePlayer; _view = LoadView(placeForUi); _view.Init(StartGame); }