Beispiel #1
0
 public void QuestionDialog(bool election)
 {
     if (_dialogBlock.GetQuestionState())
     {
         DialogText text = GetDialog(_dialogBlock.GetCurrentDialogID());
         _dialogBlock.NewLineDialog((election) ? GetDialog(GetDialog(text.answerB).answerA) : GetDialog(GetDialog(text.answerA).answerA));
     }
 }
Beispiel #2
0
        private void Start()
        {
            switch (_languageCode)
            {
            default:                //spanish, agregar tantos como idiomas a introducir
                _dialogData = dialogFiles[0];
                break;
            }

            string[] dialogSplit = _dialogData.text.Split(new char[] { '\n' });
            for (int i = 1; i < dialogSplit.Length; i++)
            {
                string[] col = dialogSplit[i].Split(new char[] { ';' });
                if (col[1] != "")
                {
                    DialogText dialog = new DialogText(col[0], col[1], col[2], col[3], col[4], col[5], col[6], col[7]);
                    dialogs.Add(dialog);
                }
            }
        }
        public void NewLineDialog(DialogText text)
        {
            if (text == null)
            {
                AllTextVoid();
                _dialogOption = DialogOption.EndDialog;
                return;
            }

            StopAllCoroutines();

            currentText = text;

            AllTextVoid();
            selectionImage.enabled = currentText.question;

            if (GetQuestionState())
            {
                answerA.text = _gameManager.GetDialog(currentText.answerA).dialog;
                answerB.text = _gameManager.GetDialog(currentText.answerB).dialog;
            }

            StartCoroutine(NewLine());
        }