IEnumerator Speaking(string targetSpeech, string speaker = "")
    {
        player.CanNotMove();
        Emotes.Emote();
        speechPanel.SetActive(true);
        speechText.text       = "";
        speakerNameText.text  = DetermineSpeaker(speaker);
        isWaitingForUserInput = false;

        while (speechText.text != targetSpeech)
        {
            speechText.text += targetSpeech[speechText.text.Length];
            yield return(new WaitForEndOfFrame());
        }
        isWaitingForUserInput = true;
        while (isWaitingForUserInput)
        {
            yield return(new WaitForEndOfFrame());
        }
        StopSpeaking();
    }
Exemplo n.º 2
0
 void DisplayEmote()
 {
     _emote = GameObject.FindGameObjectWithTag("EmoteManager").GetComponent <EmoteManager>();
     _emote.Emote();
 }