public void OnClickRevive()
 {
     PlayTouchSound();
     // TODO: Show reward ad
     EventManager.GetInstance().OnRevive();
     PanelStacker.RemovePanel(this);
 }
Example #2
0
        private static void ShowUI(int time)
        {
            var v_powerUpTimerUI = UIFactory.Get <PowerUpTimerUI>();

            PanelStacker.AddPanel(v_powerUpTimerUI);
            v_powerUpTimerUI.Initialize(time);
        }
        private void OnGameOver()
        {
            var v_gameOverPanel = UIFactory.Get <GameOverUIPanel>();

            if (v_gameOverPanel != null)
            {
                PanelStacker.AddPanel(v_gameOverPanel);
            }
        }
        private void OnSceneLoaded(UnityEngine.SceneManagement.Scene scene)
        {
            var v_gameplayUIPanel = UIFactory.Get <GameplayUIPanel>();

            if (v_gameplayUIPanel != null)
            {
                PanelStacker.AddPanel(v_gameplayUIPanel);
            }
        }
        public void OnClickShowTutorial()
        {
            PlayTouchSound();
            var v_tutorialPanel = UIFactory.Get <TutorialsUIPanel>();

            if (v_tutorialPanel != null)
            {
                PanelStacker.AddPanel(v_tutorialPanel);
            }
        }
Example #6
0
        public void OnClickPause()
        {
            PlayTouchSound();
            var v_pauseMenu = UIFactory.Get <GameplayPauseUIPanel>();

            if (v_pauseMenu != null)
            {
                PanelStacker.AddPanel(v_pauseMenu);
            }
        }
Example #7
0
 public void Initialize(int seconds)
 {
     LeanTween.cancel(_tweenId);
     _fillImage.fillAmount = 1f;
     UpdateText(seconds);
     _tweenId = LeanTween.value(gameObject, (time) => {
         _fillImage.fillAmount = time / seconds;
         UpdateText((int)time);
     }, seconds, 0, seconds)
                .setOnComplete(() => PanelStacker.RemovePanel(this)).uniqueId;
 }
Example #8
0
        public void OnClickSettings()
        {
            _panelCanvasGroup.blocksRaycasts = false;
            PlayTouchSound();
            var v_settingsPanel = UIFactory.Get <SettingsUIPanel>();

            if (v_settingsPanel != null)
            {
                PanelStacker.AddPanel(v_settingsPanel);
            }
        }
        private void OnSceneLoaded(UnityEngine.SceneManagement.Scene scene)
        {
            PanelStacker.AddPanel(UIFactory.Get <MainMenuUIPanel>());
            // If the game is being opened for the first time, open tutorials panel.
            var v_tutorialFinished = PlayerPrefs.GetInt(GlobalConstants.TutorialFinished, 0);

            if (v_tutorialFinished != 0)
            {
                return;
            }
            PanelStacker.AddPanel(UIFactory.Get <TutorialsUIPanel>());
            PlayerPrefs.SetInt(GlobalConstants.TutorialFinished, 1);
        }
        private void OnSceneLoaded(Scene scene, LoadSceneMode mode)
        {
            var v_loadingPanel = UIFactory.Get <LoadingUIPanel>();

            if (v_loadingPanel != null)
            {
                v_loadingPanel.UpdateProgress(0f);
                PanelStacker.RemovePanel(v_loadingPanel);
            }
            PanelStacker.Clear();
            UIFactory.Clear();
            ManagerFactory.Clear();
            EventManager.GetInstance().OnSceneLoaded(scene);
        }
 public void OnClickBack()
 {
     _panelCanvasGroup.blocksRaycasts = false;
     PlayBackSound();
     PanelStacker.RemovePanel(this);
 }
Example #12
0
 public void OnClickResume()
 {
     PlayBackSound();
     EventManager.GetInstance().OnResumeGame();
     PanelStacker.RemovePanel(this);
 }
 public void LoadSceneAsync(string sceneName)
 {
     PanelStacker.Clear();
     PanelStacker.AddPanel(UIFactory.Get <LoadingUIPanel>());
     StartCoroutine(AsyncLoadScene(sceneName));
 }
Example #14
0
 public void OnClickBack() {
     PlayBackSound();
     PanelStacker.RemovePanel(this);
 }