void Update()
 {
     if (Input.anyKeyDown)
     {
         RpgManager.Player.enabled = true;
         RpgManager.LoadScene("MainMenu", null);
     }
 }
Exemple #2
0
    public virtual void Validate()
    {
        RpgManager.StopEndMusic();

        switch (type)
        {
        case MenuButtonType.NewGame:
            RpgManager.LoadScene("NeuillyPlaisance", "Entrance");
            RpgManager.Instance.gameState = RpgManager.GameState.Rpg;
            RpgManager.Data = new GameData();
            RpgManager.Instance.dataDebug.SetData(RpgManager.Data);
            break;

        case MenuButtonType.Continue:
            RpgManager.Data = GameData.LoadFromFile();
            RpgManager.Instance.dataDebug.SetData(RpgManager.Data);
            RpgManager.LoadScene(RpgManager.Data.scene, RpgManager.Data.place);
            break;

        case MenuButtonType.Hints:
            //FindObjectOfType<MainMenuStory>().GetComponent<Animator>().SetBool("Hints", true);
            break;

        case MenuButtonType.Quit:
            Application.Quit();
            break;

        case MenuButtonType.BackToMenu:
            RpgManager.Player.EndTalk();
            RpgManager.Instance.menu.gameObject.SetActive(false);
            RpgManager.Player.enabled     = true;
            RpgManager.Instance.gameState = RpgManager.GameState.MainMenu;
            RpgManager.LoadScene("MainMenu", null);
            break;

        case MenuButtonType.BackToGame:
            RpgManager.Instance.ToggleMenu();
            break;

        default:
            break;
        }
    }