public void DeleteSavedReading() { if (readingToDelete != null) { savedReadings.Remove(readingToDelete); SaveUtils.SaveReadings(savedReadings); Init(gameRunner); } else { Debug.LogError("tried to delete a saved reading when one wasn't set"); } }
public void FavoriteOrUnfavoriteReading(SavedReading readingToFavoriteOrUnfavorite) { readingToFavoriteOrUnfavorite.isFavorite = !readingToFavoriteOrUnfavorite.isFavorite; // toggle isFavorite by setting it to whatever it isn't SaveUtils.SaveReadings(savedReadings); Init(gameRunner); }