public void SerializeNotification(DelayGramNotification newNotification) { if (currentSave.notifications == null) { currentSave.notifications = new List <DelayGramNotification>(); } currentSave.notifications.Add(newNotification); SaveGame(); }
private void AddNewNotification(int newNotifications) { var notificationString = newNotifications.ToString() + " people liked your photo"; var dgNotification = new DelayGramNotification(); dgNotification.text = notificationString; dgNotification.dateTime = DateTime.Now; serializer.SerializeNotification(dgNotification); }