private void DisplayText()
    {
        this.gameObject.SetActive(true);

        _textToDisplay = _textToDisplay.Replace("<br> ", System.Environment.NewLine);
        char[] charArr  = _textToDisplay.ToCharArray();
        string charText = "";

        foreach (char ch in charArr)
        {
            charText          = charText + ch;
            dialogueText.text = _textToDisplay;
        }
        _characterDialogue.DoneTyping();
        _textToDisplay = "";
    }
Exemplo n.º 2
0
    private void DisplayText()
    {
        if (_characterDialogue == null)
        {
            _characterDialogue = _character.gameObject.GetComponent <CharacterDialogue>();
        }

        _textToDisplay = _characterDialogue.DialogueText;
        this.gameObject.SetActive(true);

        char[] charArr  = _textToDisplay.ToCharArray();
        string charText = "";

        foreach (char ch in charArr)
        {
            charText        = charText + ch;
            dialogText.text = _textToDisplay;
        }
        _characterDialogue.DoneTyping();
        _textToDisplay = "";
    }