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); }
public void SaveGame() { Debug.Log("Saving Game"); gm.gameState = _GM_Script.GameState.SAVING_GAME; gm.state.gameState = GameStateScript.GameState.SAVING_GAME; hidethis.SetActive(false); waiting = true; scene.FadeOutOnSceneExit(scene.fadeOutTime, 1); }
public void SelectMenuHandler(int button) { if (button == 0) // key item { state = MenuState.KEYITEM; itemMenu.SetActive(true); gameMenu.SetActive(false); returnItem.Select(); key.DisplayKeyItems(); } else if (button == 1) // controls { state = MenuState.CONTROLS; controlMenu.SetActive(true); gameMenu.SetActive(false); returnControl.Select(); } else if (button == 2) // quit game { // quit game scene.FadeOutOnSceneExit(scene.fadeOutTime, 0); } else if (button == 3) // exit menu { CancelMenuHandler(); } else if (button == 4) // return from item { CancelMenuHandler(); } else if (button == 5) // return from controls { CancelMenuHandler(); } }
public void LoadGame() { numsave = PlayerPrefs.GetInt("NumSave", 0); if (numsave == 0) { gs.NewGame(); PlayerPrefs.Save(); Debug.Log("No Saves To Load"); } else { gs.LoadData(); Debug.Log("Loading Save"); } scene.FadeOutOnSceneExit(scene.fadeOutTime, 4); }
void CheckGameOver() { if (player.PlayerHP <= 0) { playState = PlayState.NONE; gameState = GameState.GAME_OVER; // Transfer to game over scene scene.FadeOutOnSceneExit(scene.fadeOutTime, 2); } }
void GetOnElevator() { scene.FadeOutOnSceneExit(scene.fadeOutTime, 5); }
public void SaveGame() { state.gameState = _GM_Script.GameState.SAVING_GAME; scene.FadeOutOnSceneExit(scene.fadeOutTime, 1); }
public void ExitToFloor() { scene.FadeOutOnSceneExit(scene.fadeOutTime, FLOOR_EXIT_SCENE); }