Exemple #1
0
    // Fades out and in to one of the game over panel. Called in ball too, when the ball hit the left wall.
    public IEnumerator TransitionToGOPanel(GameObject panel)
    {
        HideHUD();
        ballComp.StopBall();
        audioManager.Stop("FollowHer");
        StartCoroutine(sceneFader.FadeOutAndIn());
        yield return(transitionDelay);

        if (panel == diePanel)
        {
            audioManager.Play("Disconnect");
        }
        if (panel == losePanel)
        {
            audioManager.Play("SoundOff");
        }
        if (panel == winPanel)
        {
            audioManager.Play("Connect");
        }
        panel.SetActive(true);
    }