2 using System.Collections;
8 private DateTime expireDate;
9 private Sprite notificationSprite;
10 private DateTime creationDate;
23 this.notificationSprite = null;
24 this.additionalInfo = null;
25 this.creationDate = DateTime.Now;
26 if(timeToLive == TimeSpan.Zero)
28 this.expireDate = DateTime.MaxValue;
32 this.expireDate = DateTime.Now + timeToLive;
44 public Notification(
string text, TimeSpan timeToLive, Sprite notificationSprite) : this(text, timeToLive)
46 this.notificationSprite = notificationSprite;
49 public Notification(
string text, TimeSpan timeToLive, Sprite notificationSprite,
AdditionalInfo additionalInfo) : this(text, timeToLive)
51 this.additionalInfo = additionalInfo;
60 public DateTime ExpireDate
62 get {
return expireDate; }
65 public DateTime CreationDate
67 get {
return creationDate; }
70 public Sprite NotificationSprite
72 get {
return notificationSprite; }
77 get {
return additionalInfo; }
Notification(string text, TimeSpan timeToLive)
A constructor.
Notification(string text, TimeSpan timeToLive, Sprite notificationSprite)
A constructor.