Exemple #1
0
        private void DrawQuestion(Language _desiredLanguage)
        {
            string question;

            question = structure.GetQuestion(_desiredLanguage);

            GUILayout.Label("QUESTION: ");

            if (question != default)
            {
                GUILayout.TextArea(question);
            }
            else
            {
                GUILayout.Label(" NOT FOUND ");
            }
        }
Exemple #2
0
        public void Initialize(SO_DialogStructure _inputData, DialogueManager _manager, Language _targetlanguage)
        {
            dialogueManager = _manager;
            dialogueData    = _inputData as SO_QuestionAnswerStructure;

            question.text      = dialogueData.GetQuestion(_targetlanguage);
            spekerImage.sprite = _inputData.GetSpeakerSprite();

            foreach (SO_Answer answer in dialogueData.GetAnswers())
            {
                CanvasedAnswer canvasedAnswer = Instantiate(answerPrefab, answersContainer);
                canvasedAnswer.Initialize(answer, dialogueManager, _targetlanguage);

                if (canvasedAnswers == null)
                {
                    canvasedAnswers = new List <CanvasedAnswer>();
                }

                canvasedAnswers.Add(canvasedAnswer);
            }

            EnableVisibility();
        }