Beispiel #1
0
        private void FreeAnswers()
        {
            int length = container.childCount;

            for (int i = 0; i < length; i++)
            {
                AnswerController ac = container.GetChild(i).GetComponent <AnswerController>();
                ac.Free();
                //Transform answer = this.container.transform.GetChild(i);
                //Destroy(answer.gameObject);
            }
        }
Beispiel #2
0
        void Print(Question question, Character character)
        {
            // questionText.text = this.question.text;
            int length = question.answers.Length;

            for (int i = 0; i < length; i++)
            {
                GameObject       newGO  = Instantiate(answerBubblePrefab, container);
                AnswerController answer = newGO.GetComponent <AnswerController>();
                answer.Set(this, question.answers[i], character);
            }
        }