public GameState(GameStateManager gameStateManager, ScenesManager scenesManager, UIManager uIManager) { _gameStateManager = gameStateManager; _scenesManager = scenesManager; _uIManager = uIManager; }
public LoadingPopup(LoadObjectsManager loadObjectsManager, UIManager uiManager, ScenesManager scenesManager) { _loadObjectsManager = loadObjectsManager; _uiManager = uiManager; _uiManager.AddPopup(this); _scenesManager = scenesManager; var resourceObject = _loadObjectsManager.GetObjectByPath(Constants.PATH_TO_UI_PREFABS + "Popups/LoadingPopup").GetAwaiter(); resourceObject.OnCompleted(() => { SelfPage = MonoBehaviour.Instantiate(resourceObject.GetResult() as GameObject); SelfPage.transform.SetParent(_uiManager.Canvas.transform, false); _pageComponent = SelfPage.GetComponent <LoadingPopupComponent>(); OnPopupWasInited(); }); }
public GamePage(UIManager uiManager, LoadObjectsManager loadObjectsManager, ScenesManager scenesManager, GameStateManager gameStateManager) { _uiManager = uiManager; _loadObjectsManager = loadObjectsManager; _scenesManager = scenesManager; _gameStateManager = gameStateManager; _uiManager.AddPage(this); _awaiter = _loadObjectsManager.GetObjectByPath(Constants.PATH_TO_UI_PREFABS + "GamePage").GetAwaiter(); _awaiter.OnCompleted(() => { SelfPage = MonoBehaviour.Instantiate(_awaiter.GetResult() as GameObject); SelfPage.transform.SetParent(_uiManager.Canvas.transform, false); PageComponent = SelfPage.GetComponent <GamePageComponent>(); }); }