Ejemplo n.º 1
0
    public void StartNewGame()
    {
        gs.NewGame();

        state.SetGameState(GameStateScript.GameState.PLAYING_GAME);
        state.SetPlayState(GameStateScript.PlayState.PLAYER);

        // do scene manager change/fade out to new scene
        scene.FadeOutOnSceneExit(scene.fadeOutTime, 4);
    }
Ejemplo n.º 2
0
    void Start()
    {
        newgamebutton.Select();
        gs    = GameObject.Find("GameStatus").GetComponent <GameStatusScript>();
        state = GameObject.Find("GameState").GetComponent <GameStateScript>();
        scene = GameObject.Find("SceneChanger").GetComponent <SceneChangerScript>();


        // set GameState to mainmenu
        state.SetGameState(GameStateScript.GameState.MAIN_MENU);

        // set gameplay to none
        state.SetPlayState(GameStateScript.PlayState.NONE);

        // Set GameStatus to New
        gs.StartNewGame = true;

        hidemusic.SetActive(false);
    }