Пример #1
0
    IEnumerator TypeSentence(string sentence)
    {
        dialogueText.text = "";
        foreach (char letter in sentence.ToCharArray())
        {
            dialogueText.text += letter;
            music.BeatSound();
            yield return(null);
        }
        yield return(new WaitForSeconds(2f));

        DisplayNextSentence();
    }