public void Stop() { if (textToSpeechPlugin != null) { textToSpeechPlugin.Stop(); } }
private IEnumerator clickAction() { float waitTime = 0.35f; yield return(new WaitForSeconds(waitTime)); if (this.numClicks == 1) { SceneManager.LoadScene("StartScreen", LoadSceneMode.Single); textToSpeechPlugin.Stop(); } else if (this.numClicks >= 2) { SceneManager.LoadScene("GameStage", LoadSceneMode.Single); textToSpeechPlugin.Stop(); } Debug.Log("Number o clicks: " + this.numClicks); this.numClicks = 0; }
private IEnumerator clickAction() { float waitTime = 0.35f; yield return(new WaitForSeconds(waitTime)); if (this.numClicks == 1) { //SceneManager.LoadScene("GameStage", LoadSceneMode.Single); } else if (this.numClicks >= 2) { //SceneManager.LoadScene("TutorialScreen", LoadSceneMode.Single); SceneManager.LoadScene("GameStage", LoadSceneMode.Single); textToSpeechPlugin.Stop(); } this.numClicks = 0; }
//TextToSpeechPlugin Events public void ToggleSpeechState() { if (microphoneImage.gameObject.activeInHierarchy) { // start listening to speech StartListening(); } else { if (speechPlugin != null) { speechPlugin.StopCancel(); } if (textToSpeechPlugin != null) { textToSpeechPlugin.Stop(); } } }