Example #1
0
    public void OnTalk(GameObject go, string text, bool defVoice)
    {
        TextToSpeechManager tts = null;

        if (go != null)
        {
            tts = go.GetComponent <TextToSpeechManager>();
        }

        if (tts != null)
        {
            tts.ChangeVoice(defVoice);
            tts.SpeakText(text);
        }
    }
Example #2
0
 public void OnWin()
 {
     textToSpeechManager.ChangeVoice(true);
     textToSpeechManager.SpeakText("Congratulations");
 }