예제 #1
0
 public void QuitGame()
 {
     if (SceneManager.GetActiveScene().name == "DungeonMultiplayer")
     {
         RaidSceneManager.Instanse.OnSceneLeave();
         PhotonGameManager.Instanse.LeaveRoom();
         WindowClosed();
         return;
     }
     else if (SceneManager.GetActiveScene().name == "EstateManagement")
     {
         EstateSceneManager.Instanse.OnSceneLeave();
         DarkestDungeonManager.SaveData.UpdateFromEstate();
         DarkestDungeonManager.Instanse.SaveGame();
     }
     else if (SceneManager.GetActiveScene().name == "Dungeon")
     {
         if (!RaidSceneManager.HasAnyEvents)
         {
             DarkestDungeonManager.SaveData.UpdateFromRaid();
             DarkestDungeonManager.Instanse.SaveGame();
         }
         RaidSceneManager.Instanse.OnSceneLeave();
     }
     DarkestSoundManager.SilenceNarrator();
     Application.Quit();
 }
예제 #2
0
 public void ReturnToCampaignSelection()
 {
     if (SceneManager.GetActiveScene().name == "DungeonMultiplayer")
     {
         WindowClosed();
         RaidSceneManager.Instanse.AbandonButtonClicked();
         return;
     }
     else if (SceneManager.GetActiveScene().name == "EstateManagement")
     {
         EstateSceneManager.Instanse.OnSceneLeave();
         DarkestDungeonManager.SaveData.UpdateFromEstate();
         DarkestDungeonManager.Instanse.SaveGame();
     }
     else if (SceneManager.GetActiveScene().name == "Dungeon")
     {
         if (!RaidSceneManager.HasAnyEvents)
         {
             DarkestDungeonManager.SaveData.UpdateFromRaid();
             DarkestDungeonManager.Instanse.SaveGame();
         }
         RaidSceneManager.Instanse.OnSceneLeave();
     }
     DarkestSoundManager.SilenceNarrator();
     SceneManager.LoadScene("CampaignSelection");
     WindowClosed();
 }