Exemplo n.º 1
0
        public MenuPage(UIManager uiManager,
                        LoadObjectsManager loadObjectsManager,
                        ScenesManager scenesManager,
                        GameStateManager gameStateManager,
                        PlayerDataManager dataManager,
                        SoundSystem soundSystem)
        {
            _uiManager          = uiManager;
            _loadObjectsManager = loadObjectsManager;
            _scenesManager      = scenesManager;
            _gameStateManager   = gameStateManager;
            _dataManager        = dataManager;
            _soundSystem        = soundSystem;

            _uiManager.AddPage(this);

            _awaiter = _loadObjectsManager.GetObjectByPath(Constants.PATH_TO_UI_PREFABS + "MenuPage").GetAwaiter();



            _awaiter.OnCompleted(() => {
                SelfPage = MonoBehaviour.Instantiate(_awaiter.GetResult() as GameObject);
                SelfPage.transform.SetParent(_uiManager.Canvas.transform, false);
                _pageComponent = SelfPage.GetComponent <MenuPageComponent>();
            });
        }
Exemplo n.º 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();
            });
        }
Exemplo n.º 3
0
        public SettingsPopup(UIManager uIManager,
                             LoadObjectsManager loadObjectsManager,
                             GameStateManager gameStateManager)
        {
            _uIManager          = uIManager;
            _loadObjectsManager = loadObjectsManager;
            _gameStateManager   = gameStateManager;
            _uIManager.AddPopup(this);

            _awaiter = _loadObjectsManager.GetObjectByPath(Constants.PATH_TO_UI_PREFABS + "Popups/SettingsPopup").GetAwaiter();

            _awaiter.OnCompleted(() => {
                SelfPage = MonoBehaviour.Instantiate(_awaiter.GetResult() as GameObject);
                SelfPage.transform.SetParent(_uIManager.Canvas.transform, false);
                _pageComponent = SelfPage.GetComponent <SettingsPopupComponent>();
                OnPopupWasInited();
            });
        }
Exemplo n.º 4
0
 public RegularShop(LoadObjectsManager loadObjectsManager, Transform parent)
 {
     _parent             = parent;
     _loadObjectsManager = loadObjectsManager;
 }
Exemplo n.º 5
0
 public ShopManager(UIManager uIManager, LoadObjectsManager loadObjectsManager)
 {
     _uIManager          = uIManager;
     _loadObjectsManager = loadObjectsManager;
 }