Esempio n. 1
0
 void open()
 {
     print("abierto");
     src.volume = 0.5f;
     src.PlayOneShot(openSound);
     screenInput.deactivate(openSound.length);
     Invoke("soundFound", openSound.length);
 }
Esempio n. 2
0
 void changeList()
 {
     if (currentList == scene)
     {
         playTTS(inventoryClip);
         screenInput.deactivate(inventoryClip.length);
         Invoke("callCurrentList", inventoryClip.length);
     }
     else if (currentList == inventory)
     {
         playTTS(sceneClip);
         screenInput.deactivate(sceneClip.length);
         Invoke("callCurrentList", sceneClip.length);
     }
 }
Esempio n. 3
0
 //procesa un doble click tomando como centro más cercano cIndex, y actúa en consecuencia
 void ProcessDoubleClick(int cIndex, float dist)
 {
     //si el centro más cercano cumple la condición de distancia
     if (dist <= radios[cIndex].cerca)
     {
         //es la solución
         if (cIndex == solutionIndex)
         {
             //desactivamos elementos activos
             src.Stop();
             tapSound.Stop();
             tapPlay = false;
             //reproducimos el audio de victoria
             src.PlayOneShot(winSound);
             screenInput.deactivate(winSound.length);
             //llamada al método que gestiona los eventos de victoria, cuando termine de reproducirse el audio actual
             Invoke("onVictory", winSound.length);
         }
         //condición de fallo
         else
         {
             //desactivamos elementos activos
             tapSound.Stop();
             tapPlay = false;
             src.Stop();
             src.PlayOneShot(looseSound);
             //eliminamos del juego el punto clickado
             ChangeRadius(cIndex, 0, 0, 0);
         }
     }
 }
Esempio n. 4
0
 // Start is called before the first frame update
 void Start()
 {
     ganzObj = transform.GetChild(0).gameObject;
     src     = GetComponent <AudioSource>();
     randUnlockPosition();
     SRManager.instance.playTTS(infoClip);
     screenInput = ScreenInput.instance;
     screenInput.deactivate(infoClip.length);
 }
Esempio n. 5
0
 private void Start()
 {
     screenInput = ScreenInput.instance;
     src         = GetComponent <AudioSource>();
     if (src == null)
     {
         throw new System.Exception("No se encontró el componente Audio Source para reproducir sonido");
     }
     //reproducimos el audio inicial
     src.clip = introTTS;
     src.Play();
     screenInput.deactivate(introTTS.length);    //desactivamos el input mientras dure el audio
 }