public void Show(bool _doShow, bool _immediate = false)
        {
            GlobalUI.Init();

            IsShown = _doShow;
            if (_doShow)
            {
                clicked = false;
                if (_immediate)
                {
                    I.showTween.Complete();
                }
                else
                {
                    I.showTween.PlayForward();
                }
            }
            else
            {
                if (_immediate)
                {
                    I.showTween.Rewind();
                }
                else
                {
                    I.showTween.PlayBackwards();
                }
            }
        }
        /// <summary>
        /// Call this to show/hide the scene transitioner.
        /// </summary>
        /// <param name="_doShow">If TRUE animates the transition IN and stops when the screen is covered, otherwise animates OUT</param>
        /// <param name="_onComplete">Eventual callback to call when the transition IN/OUT completes</param>
        public static void Show(bool _doShow, Action _onComplete = null)
        {
            GlobalUI.Init();

            GlobalUI.SceneTransitioner.SetContent();
            GlobalUI.SceneTransitioner.DoShow(_doShow, _onComplete);
        }
Beispiel #3
0
        /// <summary>
        /// Activate view elements if SentenceId != "" and display sentence.
        /// </summary>
        public void DisplaySentence(Database.LocalizationData data, float _duration = 2, bool _isKeeper = false,
                                    System.Action _callback = null)
        {
            if (!AppManager.I.AppSettings.SubtitlesEnabled)
            {
                return;
            }

            GlobalUI.Init();
            this.StopAllCoroutines();
            currentCallback = _callback;
            showTween.PlayForward();
            if (_isKeeper)
            {
                bgColorTween.PlayBackwards();
            }
            else
            {
                bgColorTween.PlayForward();
            }
            WalkieTalkie.Show(_isKeeper);
            DisplayText(data, _duration);
        }
Beispiel #4
0
        private void DisplayText(string learningText, string helpText, float fillPeriod = 2, bool _isKeeper = false,
                                 Action _callback = null)
        {
            if (!AppManager.I.AppSettings.KeeperSubtitlesEnabled)
            {
                return;
            }

            GlobalUI.Init();
            StopAllCoroutines();
            currentCallback = _callback;
            showTween.PlayForward();
            if (_isKeeper)
            {
                bgColorTween.PlayBackwards();
            }
            else
            {
                bgColorTween.PlayForward();
            }
            WalkieTalkie.Show(_isKeeper);

            Display(learningText, helpText, fillPeriod);
        }
Beispiel #5
0
        // ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
        // ■■■ PUBLIC METHODS

        /// <summary>
        /// Call this to show/hide the continue screen.
        /// </summary>
        /// <param name="_onContinue">Eventual callback to call when the user clicks to continue</param>
        /// <param name="_mode">Mode</param>
        public static void Show(Action _onContinue, ContinueScreenMode _mode = ContinueScreenMode.ButtonWithBg, bool _pulseLoop = false)
        {
            GlobalUI.Init();
            GlobalUI.ContinueScreen.DoShow(_onContinue, _mode, _pulseLoop);
        }