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!"); }
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!"); } }
public void SaveGame() { gameExtensions.ForEach(g => g.OnBeforeGameSave()); GameState.SerializeTo("save"); }
public void SaveGame() { GameState.SerializeTo("save"); }