/// <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);
        }
示例#2
0
        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>
 /// Activate view elements if SentenceId != "" and display sentence.
 /// </summary>
 public void DisplaySentence(Db.LocalizationData data, float _duration = 2, bool _isKeeper = false, System.Action _callback = null)
 {
     GlobalUI.Init();
     this.StopAllCoroutines();
     currentCallback = _callback;
     showTween.PlayForward();
     if (_isKeeper)
     {
         bgColorTween.PlayBackwards();
     }
     else
     {
         bgColorTween.PlayForward();
     }
     WalkieTalkie.Show(_isKeeper);
     DisplayText(data, _duration);
 }
示例#4
0
        void Awake()
        {
            if (FindObjectOfType(typeof(AudioManager)) == null)
            {
                Instantiate(AudioManager);
            }

            if (FindObjectOfType(typeof(EventSystem)) == null)
            {
                Instantiate(EventsManager);
            }

            if (FindObjectOfType(typeof(Lean.Touch.LeanTouch)) == null)
            {
                Instantiate(TouchManager);
            }

            // init the mighty GlobalUI
            GlobalUI.Init();
        }
示例#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)
        {
            GlobalUI.Init();
            GlobalUI.ContinueScreen.DoShow(_onContinue, _mode);
        }