public static bool Save(Venue venue, string gameID) { string filename = VenueManager.GetFilename(gameID) + "?tag=" + venue.id; ES2.Save(venue, filename); return(true); }
public static void DeleteSaved(string gameID) { string filename = VenueManager.GetFilename(gameID); if (ES2.Exists(filename)) { ES2.Delete(filename); } if (VenueManager.Instance != null && SavedGameManager.Instance.IsGameLoaded() && gameID == SavedGameManager.Instance.CurrentGameID) { VenueManager.Instance.DestroyCurrentGameObjects(); } }
public static bool DeleteSaved(string id, string gameID) { string filename = VenueManager.GetFilename(gameID) + "?tag=" + id; if (ES2.Exists(filename)) { ES2.Delete(filename); return(true); } else { Debug.LogError(string.Format("Unable to delete venue at {0}: No such file found", filename)); return(false); } }
public static bool Load(Venue venue, string id, string gameID) { string filename = VenueManager.GetFilename(gameID) + "?tag=" + id; if (ES2.Exists(filename)) { ES2.Load <Venue>(filename, venue); venue.name = venue.venueName; return(true); } else { Debug.LogError(string.Format("Unable to load venue from {0}: No such file found", filename)); return(false); } }
public void Load(string gameID) { DestroyCurrentGameObjects(); string filename = VenueManager.GetFilename(gameID); if (ES2.Exists(filename)) { string[] tags = ES2.GetTags(filename); foreach (string tag in tags) { Venue venue = CreateEmptyVenue(); Venue.Load(venue, tag, gameID); venues.Add(venue); } } }