Exemple #1
0
        public void StartCountdown(Preperation preperation, RoundText.delegateFunc callback)
        {
            _textFade.FadeIn();

            _preperation = preperation;
            _callback    = callback;
        }
 public void ShowPreperationText(Preperation preperation, RoundText.delegateFunc func = null)
 {
     if (preperationCountdownText != null)
     {
         preperationCountdownText.StartCountdown(preperation, func);
     }
 }
 public void ShowText(RoundText textObj, string text, float seconds, RoundText.delegateFunc func = null)
 {
     if (textObj != null)
     {
         textObj.ShowForSeconds(seconds, text, func);
     }
 }
Exemple #4
0
        // Update is called once per frame
        void Update()
        {
            if (_preperation != null)
            {
                int seconds = _preperation.timeInSeconds;

                UpdateText(string.Format("{0} {1}", PREPERATION_PRE_TEXT, seconds));

                if (_preperation.timeInSeconds <= 0)
                {
                    _preperation = null;

                    if (_callback != null)
                    {
                        _callback();
                        _callback = null;
                    }

                    _textFade.FadeOut();
                }
            }
        }