示例#1
0
    public void RestartButtonClicked()
    {
        if (!lockRestart)
        {
            lockRestart = true;
            showPanels.DisableGameOverButtons();
            if (changeMusicOnStart)
            {
                playMusic.FadeDown(fadeColorAnimationClip.length);
                Invoke("PlayNewMusic", fadeAlphaAnimationClip.length);
            }

            inMainMenu = false;

            //Set trigger for animator to start animation fading out Menu UI
            animGameOverAlpha.SetTrigger("fade");

            //Wait until game has started, then hide the main menu
            Invoke("HideGameOverDelayed", fadeAlphaAnimationClip.length);

            Debug.Log("Game started in same scene! Put your game starting stuff here.");
        }
    }