/// <summary> /// event for when a phrase or word is recognized /// </summary> /// <param name="e"></param> private void onRecognition(PhraseRecognizedEventArgs e) { switch (e.text) { case "Start": if (!PC.IsPaused) { HUDtext.text = "Start"; StartCoroutine(FadeFlash(AudioCG, AudioHUD)); TC.Invoke("startTargetSequence", 1.5f); } break; case "Stop": if (!PC.IsPaused) { HUDtext.text = "Stop"; StartCoroutine(FadeFlash(AudioCG, AudioHUD)); TC.Invoke("stopTargetSequence", 1f); } break; case "Reset": if (!PC.IsPaused && !TC.IsRunning) { HUDtext.text = "Reset"; StartCoroutine(FadeFlash(AudioCG, AudioHUD)); TC.Invoke("resetTargetSequence", 1f); } break; case "Pause": HUDtext.text = "Pause"; StartCoroutine(FadeFlash(AudioCG, AudioHUD)); PC.MenuCalled(true); break; case "Resume": HUDtext.text = "Resume"; StartCoroutine(FadeFlash(AudioCG, AudioHUD)); PC.MenuCalled(false); break; case "Exit": HUDtext.text = "Exit"; StartCoroutine(FadeFlash(AudioCG, AudioHUD)); PC.ExitCalled(); break; } }