Exemple #1
0
    public void LevelEndReached()
    {
        levelTimer.Pause();
        levelTimer.SaveToPlayerPrefs(currentLevelNumber);
        levelFinished = true;
        levelGui.SetActive(true);


        TurnOffAllMenuButtons();
        menuButton.SetActive(true);
        restartLevelButton.SetActive(true);

        nextLevelButton.SetActive(true);
        pauseButton.SetActive(false);


        levelEndTint.colorsToChangeTo = new Color[] { initalTintColor, new Color(0, 1, 0, 0.8f) };
        levelEndTint.SetFirstColor();
        levelEndTint.DoCompleteTransition();

        levelFinishedLogo.colorsToChangeTo = new Color[] { Color.yellow, Color.green };
        levelFinishedText.text             = "Level\n" + currentLevelNumber;
        levelFinishedLogo.DoCompleteTransition();

        Balloon.balloonPoppedCounter = 0;
        PlayerPrefs.SetInt("Level" + currentLevelNumber, 1);
    }