Exemplo n.º 1
0
 public Features(UIService ui)
 {
     this.UI          = ui;
     this.DataService = new Services.DataService(Engine);
     Load();
     this.Engine.TaxonomyLoaded += Engine_TaxonomyLoaded;
     this.Engine.InstanceLoaded += Engine_InstanceLoaded;
     this.Settings.Load(null);
     this.Settings = Settings.Current;
     ShowInBrowser(Engine.HtmlPath);
 }
Exemplo n.º 2
0
        // Start is called before the first frame update
        void Awake()
        {
            _uiService = ServiceLocator.GetService <UIService>();

            _uiService.SetActiveStoreMenu += SetActive;
            _exitButton.onClick.AddListener(BackToMainMenu);
            _skinStoreController.UpdateStoreCoins  += () => { UpdateCoins(true); };
            _coinsStoreController.UpdateStoreCoins += () => { UpdateCoins(true); };
            _trainsButton.onClick.AddListener(OpenSkinStore);
            _coinsButton.onClick.AddListener(OpenCoinsStore);
            OpenSkinStore();
            UpdateCoins();
            _uiService.OpenMainMenu += delegate { SetActivePanel(false); };
        }
Exemplo n.º 3
0
        private void Awake()
        {
            _uiService           = ServiceLocator.GetService <UIService>();
            _playGamesService    = ServiceLocator.GetService <PlayGamesService>();
            _skinService         = ServiceLocator.GetService <SkinService>();
            _achievementsService = ServiceLocator.GetService <AchievementsService>();

            _skinsList = new List <SkinButton>();
            _getRandomSkin.onClick.AddListener(GetRandomSkin);
            _pages.ForEach(page => _skinsList.AddRange(page.GetComponentsInChildren <SkinButton>()));
            _skinService.UpdateSelectedTrainPreview += UpdateSelectedPreview;
            UpdateSkins();
            _selectedTrainPreview.sprite = _skinService.GetCurrentSkin();
        }
Exemplo n.º 4
0
        // Start is called before the first frame update
        void Awake()
        {
            _adsService          = ServiceLocator.GetService <AdsService>();
            _uiService           = ServiceLocator.GetService <UIService>();
            _achievementsService = ServiceLocator.GetService <AchievementsService>();

            _uiService.OpenReviveMenu += Open;
            _reviveButton.onClick.AddListener(_adsService.ShowReviveVideoAdvertisement);
            _timerButton.TimerEnded += ShowEndGameMenu;
            _noThanksButton.onClick.AddListener(ShowEndGameMenu);

            _adsService.ReviveAdvertisementUpdate += delegate(bool isReady) { _reviveButton.interactable = isReady; };
            _adsService.TrainRevive    += ShowPauseMenu;
            _uiService.OpenEndGameMenu += delegate { SetActivePanel(false); };
        }
Exemplo n.º 5
0
        private void Awake()
        {
            _levelService        = ServiceLocator.GetService <LevelService>();
            _adsService          = ServiceLocator.GetService <AdsService>();
            _gameDataService     = ServiceLocator.GetService <GameDataService>();
            _uiService           = ServiceLocator.GetService <UIService>();
            _playGamesService    = ServiceLocator.GetService <PlayGamesService>();
            _achievementsService = ServiceLocator.GetService <AchievementsService>();

            _bonusButton.onClick.AddListener(_adsService.ShowBonusVideoAdvertisement);

            _timerButton.TimerEnded += delegate { _bonusButton.gameObject.SetActive(false); };
            _adsService.BonusAdvertisementUpdate += delegate(bool isReady) { _bonusButton.interactable = isReady; };

            _adsService.BonusCoins     += GetBonus;
            _uiService.OpenEndGameMenu += Open;
            _uiService.OpenPauseMenu   += () => SetActivePanel(false);
            _exitToMenu.onClick.AddListener(ExitToMainMenu);
            _uiService.EndGameBackButton += ExitToMainMenu;
        }