public IEnumerator SaveGame()
 {
     Debug.Log("[SAVE GAME] Before saving game...");
     foreach (var g in gameExtensions)
     {
         yield return(StartCoroutine(g.OnBeforeGameSave()));
     }
     Debug.Log("[SAVE GAME] Saving...");
     GameState.SerializeTo("save");
     Debug.Log("[SAVE GAME] Done!");
 }
Esempio n. 2
0
 public void SaveGame()
 {
     if (!GameState.GetChapterTarget(GameState.CurrentTarget).allowsSavingGame())
     {
         Debug.Log("[SAVE GAME] Current scene doesn't allow saving. Cancelling save...");
         return;
     }
     else
     {
         Debug.Log("[SAVE GAME] Before saving game...");
         foreach (var g in PriorityAttribute.OrderExtensionsByMethod("OnBeforeGameSave", gameExtensions))
         {
             g.OnBeforeGameSave();
         }
         Debug.Log("[SAVE GAME] Saving...");
         GameState.SerializeTo("save");
         Debug.Log("[SAVE GAME] Done!");
     }
 }
Esempio n. 3
0
 public void SaveGame()
 {
     gameExtensions.ForEach(g => g.OnBeforeGameSave());
     GameState.SerializeTo("save");
 }
Esempio n. 4
0
 public void SaveGame()
 {
     GameState.SerializeTo("save");
 }