Exemplo n.º 1
0
    public void Resume()
    {
        pauseMenuUI.SetActive(false);
        Time.timeScale     = 1f;
        GameIsPaused       = false;
        spawnMalas.enPausa = false;
        moveMalas.enPausa  = false;
        musica.GetComponent <AudioSource>().UnPause();

        if (Movimiento_Zorro != null)
        {
            Movimiento_Zorro.EnPausa = false;
        }
    }
 void Update()
 {
     if (Fade.GetComponent <CanvasGroup>().alpha == 0 && !Call1)
     {
         Call1 = true;
         Destroy(Fade.GetComponent <scrInitialFade>());
         Chat.SetActive(true);
     }
     if (Chat == null)
     {
         Fade.GetComponent <CanvasGroup>().alpha += 0.008f;
         if (!call3)
         {
             Musica.GetComponent <scrAudioManager>().enabled = false;
             call3 = true;
         }
         Musica.GetComponent <AudioSource>().volume      -= 0.008f;
         AudioEffect.GetComponent <AudioSource>().volume -= 0.008f;
         if (Fade.GetComponent <CanvasGroup>().alpha == 1 && !call2)
         {
             call2 = true;
             StartCoroutine(LoadScene());
         }
     }
 }