示例#1
0
 public GameState(GameStateManager gameStateManager,
                  ScenesManager scenesManager,
                  UIManager uIManager)
 {
     _gameStateManager = gameStateManager;
     _scenesManager    = scenesManager;
     _uIManager        = uIManager;
 }
示例#2
0
        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();
            });
        }
示例#3
0
        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>();
            });
        }