Exemple #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>();
            });
        }
 public LocalizationManager(PlayerDataManager dataManager)
 {
     _dataManager = dataManager;
 }