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); } }
public void OnWin() { textToSpeechManager.ChangeVoice(true); textToSpeechManager.SpeakText("Congratulations"); }