示例#1
0
    public void StartGameInScene()
    {
        //Pause button now works if escape is pressed since we are no longer in Main menu.
        inMainMenu = false;

        //If changeMusicOnStart is true, fade out volume of music group of AudioMixer by calling FadeDown function of PlayMusic, using length of fadeColorAnimationClip as time.
        //To change fade time, change length of animation "FadeToColor"

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

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

        Debug.Log("Game started in same scene! Put your game starting stuff here.");
        showPanels.ShowHUDPanel();
        gc.GetComponent <GameController> ().init();
    }