예제 #1
0
        /// <summary>
        /// Initializes the UI.
        /// </summary>
        private void InitUI()
        {
            _ui           = FindObjectOfType <UIController>();
            _scoreCounter = FindObjectOfType <ScoreCounter>();
            _timeBar      = FindObjectOfType <TimeBar>();

            if (_ui == null)
            {
                Debug.LogError(Utils.GetObjectMissingString("UIController"));
            }
            if (_scoreCounter == null)
            {
                Debug.LogError(Utils.GetObjectMissingString("ScoreCounter"));
            }
            if (_timeBar == null)
            {
                Debug.LogError(Utils.GetObjectMissingString("TimeBar"));
            }
        }
예제 #2
0
 public void SetTimeBar(TimeBar timeBar)
 {
     _timeBar = timeBar;
 }