Esempio n. 1
0
    public void goToMainMenu()
    {
        /*
         * powers the button that leads back to main menu
         */

        // hide level end menu
        CG.alpha        = 0f;
        CG.interactable = false;

        Log.Print("Go to the main menu.", this);

        // disable start animations of main menu
        PositionAnimator.disabledAnimation = true;
        FadeOnStart.disableDelay();

        SceneTransition.Instance.LoadScene("MainMenu");
    }
Esempio n. 2
0
    /*
     * ================
     * === EXTERNAL ===
     * ================
     */

    public void LoadMainMenu()
    {
        /*
         * powers the 'main menu' button in the pause menu
         */

        ResumeGame();

        Log.Print("Returned to main menu.", this);

        Time.timeScale  = 1.0f; // resume game-speed
        currentlyPaused = false;

        // menu parts of main menu should be in place when returning to menu
        // -> therefore, deactivate animations
        PositionAnimator.disabledAnimation = true;
        FadeOnStart.disableDelay();

        SceneTransition.Instance.LoadScene("MainMenu");
    }