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); }
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); }