Beispiel #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);
     }
 }
Beispiel #3
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();
                }
            }
        }
 public Round(RoundDirector director)
 {
     _director    = director;
     _preperation = new Preperation(this);
     Restart();
 }