Esempio n. 1
0
 public void StartNativeRecognition() // Sirve para activar el reconocimiento de voz de Android.
 {
     try
     {
         apiAiUnity.StartNativeRecognition();
     } catch (Exception ex)
     {
         Debug.LogException(ex);
     }
 }
Esempio n. 2
0
 public void StartNativeRecognition()
 {
     try
     {
         apiAiUnity.StartNativeRecognition();
     } catch (Exception ex)
     {
         Debug.LogException(ex);
     }
 }
Esempio n. 3
0
    IEnumerator RunApi()
    {
        if (Application.loadedLevelName == "Play")
        {
            yield return(new WaitForSeconds(1.0F));

            audioSourceEAT.Play();
            yield return(new WaitForSeconds(0.4F));

            audioSource.Play();
            yield return(new WaitForSeconds(1.5F));
            //PlayerPrefs.SetInt("FirstApple", 1);
            //PlayerPrefs.Save();
        }
        else
        {
            yield return(new WaitForSeconds(1.0F));

            audioSourceBATH.Play();
            yield return(new WaitForSeconds(2.0F));

            if (index == 0)
            {
                audioSource.clip = soapAudio;
            }
            else
            {
                audioSource.clip = spongeAudio;
            }
            audioSource.Play();
            yield return(new WaitForSeconds(1.5F));
            //PlayerPrefs.SetInt("FirstApple", 1);
            //PlayerPrefs.Save();
        }

        try
        {
            StartCoroutine(StartWaveUI());
            apiAiUnity.StartNativeRecognition();
        }
        catch (Exception ex)
        {
            Debug.LogException(ex);
        }
        yield return(null);
    }