/// <summary>
        ///     Called by Unity to initialize the <seealso cref="MainMenuManager"/> whether it is or is not active.
        /// </summary>
        private void Awake()
        {
            if (MainMenuManager.Instance != null)
            {
                Debug.LogWarning("There was an additional active MainMenuManager. The new instance was destroyed.");
                MonoBehaviour.Destroy(this);
                return;
            }

            MainMenuManager.Instance = this;

            MainMenuManager.SetMenu(this.firstOpenedMenuIndex);

            MusicManager.PlayMusic("SuperSecretTune");

#if UNITY_EDITOR
            // Debug code... or something goes here
#endif
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Changes to the main menu
 /// </summary>
 public void GoToMainMenu()
 {
     MainMenuManager.SetMenu(MainMenuManager.TitleMenuIndex);
 }
 /// <summary>
 ///     Switches to the how to play screen.
 /// </summary>
 public void GoToHowToPlay()
 {
     MainMenuManager.SetMenu(MainMenuManager.HowToPlayScreenIndex);
 }
 /// <summary>
 ///     Switches to the credits screen.
 /// </summary>
 public void GoToCredits()
 {
     MainMenuManager.SetMenu(MainMenuManager.CreditsScreenIndex);
 }
 /// <summary>
 ///     Switches to the character creation menu.
 /// </summary>
 public void GoToCharacterCreation()
 {
     MainMenuManager.SetMenu(MainMenuManager.CharacterCreationMenuIndex);
 }