Beispiel #1
0
        /*
         * Well replay the audio clip.
         * private void FlashData()
         * {
         *  _display[_questionIndex - 1].getComponent<AudioSource>()
         * }
         */

        /// <summary>
        ///     Refreshes the question, once the next or back button is pressed.
        /// </summary>
        private void UpdateLiveFeed()
        {
            Debug.Log(_queryList.Count + " =_queryList.Count:Index = " + _questionIndex);
            if (_questionIndex == _queryList.Count + 2)
            {
                GoToNextScene();
            }
            else
            {
                _nextButton.GetComponentInChildren <Text>().text =
                    HasNextQuestion() ? "Next" : "Continue";
                if (HasPreviousQuestion())
                {
                    _backButton.Enable();
                }
                else
                {
                    _backButton.Disable();
                    _nextButton.GetComponentInChildren <Text>().text = "Begin";
                }

                Debug.Log(_go.Count + " = _go.Count:Index = " + _questionIndex);

                if (_go.Count <= _questionIndex)
                {
                    _nextButton.Disable();
                    GoToNextScene();
                }
                else
                {
                    ReloadPrefab();
                }
            }
        }