Exemplo n.º 1
0
    private IEnumerator IEEndGame()
    {
        miniGame = false;

        miniGamesController.SetDialogAndNamePanelMiniGame(true);
        miniGamesController.SetCharactersMiniGame(true);

        if (CountCorrectAnswer != 1)
        {
            miniGamesController.EndMiniGame("ShadowGames_" + CountCorrectAnswer, true);
        }
        else
        {
            miniGamesController.EndMiniGame("ShadowGames_" + CountCorrectAnswer, false);
        }


        CanvasGroup pt = GetComponent <CanvasGroup>();

        for (float f = 1; f > 0; f -= 0.02f)
        {
            pt.alpha = f;
            yield return(new WaitForFixedUpdate());
        }

        pt.alpha = 0f;
    }
Exemplo n.º 2
0
    private IEnumerator IEEndGame(bool state)
    {
        miniGame = false;

        miniGamesController.SetDialogAndNamePanelMiniGame(true);

        if (state)
        {
            controllerSoundButton.PlaySoundButtonMiniGames("Win", "PotionMaker");
        }
        else
        {
            controllerSoundButton.PlaySoundButtonMiniGames("Lose", "PotionMaker");
        }

        musicController.StopSound();

        miniGamesController.EndMiniGame("PotionMaker", state);

        CanvasGroup pt = GetComponent <CanvasGroup>();

        for (float f = 1; f > 0; f -= 0.01f)
        {
            pt.alpha = f;
            yield return(new WaitForFixedUpdate());
        }

        pt.alpha = 0f;
    }