/// <summary> /// If the user: /// <list type="bullet"> /// <item> /// <term>Hits F12</term> /// <description>It loads the assigned debug scene.</description> /// </item> /// <item> /// <term>Hits F6</term> /// <description>It saves the game's state.</description> /// </item> /// <item> /// <term>Hits F7</term> /// <description>It loads the game's state.</description> /// </item> /// <item> /// <term>Hits F8</term> /// <description>Deletes the saved game's state.</description> /// </item> /// </list> /// </summary> private void Update() { if (Input.GetKeyUp(KeyCode.F12)) { InternalScenesManager.LoadScene(InternalScenesManager.MainMenu); } else if (Input.GetKeyUp(KeyCode.F6)) { SaveGameManager.Save(); } else if (Input.GetKeyUp(KeyCode.F7)) { SaveGameManager.LoadLatest(); } else if (Input.GetKeyUp(KeyCode.F8)) { File.Delete(SaveGameManager.SavePath); } else if (Input.GetKeyUp(KeyCode.F9)) { Debug.Log(SaveGameManager.GetCurrentGame().ChoiceHistory); } }
/// <summary> /// Load the Yarn manager (Visual Novel) scene. /// </summary> public static void LoadYarn(TextAsset yarnAsset) { CurrentYarnScript = yarnAsset; SaveGameManager.GetCurrentGame().PlayedChapters.Add(yarnAsset.name); InternalScenesManager.LoadScene(InternalScenesManager.VisualNovel); }