Ejemplo n.º 1
0
 public QueuedMessage(List<String> messages, int secondsDelay, AbstractEvent abstractEvent)
 {
     if (messages != null && messages.Count > 0)
     {
         this.messagesBeforeTimeSpan.AddRange(messages);
     }
     this.dueTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (secondsDelay * 1000);
     this.abstractEvent = abstractEvent;
 }
Ejemplo n.º 2
0
 public QueuedMessage(String messageBeforeTimeSpan, String messageAfterTimeSpan, TimeSpan timeSpan, int secondsDelay, AbstractEvent abstractEvent)
 {
     if (messageBeforeTimeSpan != null)
     {
         this.messagesBeforeTimeSpan.Add(messageBeforeTimeSpan);
     }
     if (messageAfterTimeSpan != null)
     {
         this.messagesAfterTimeSpan.Add(messageAfterTimeSpan);
     }
     this.timeSpan = timeSpan;
     this.dueTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (secondsDelay * 1000);
     this.abstractEvent = abstractEvent;
 }
Ejemplo n.º 3
0
 // we pass in the event which triggered this clip so that we can query the event before playing the
 // clip to check if it's still valid against the latest game state. This is necessary for clips queued
 // with non-zero delays (e.g. you might have crossed the start / finish line between the clip being
 // queued and it being played)
 public void queueClip(String eventName, int secondsDelay, AbstractEvent abstractEvent, 
     PearlsOfWisdom.PearlType pearlType, double pearlMessageProbability)
 {
     queueClip(eventName, new QueuedMessage(secondsDelay, abstractEvent), pearlType, pearlMessageProbability);
 }
Ejemplo n.º 4
0
 public void queueClip(String eventName, int secondsDelay, AbstractEvent abstractEvent)
 {
     queueClip(eventName, secondsDelay, abstractEvent, PearlsOfWisdom.PearlType.NONE, 0);
 }
Ejemplo n.º 5
0
 // used for creating a pearl of wisdom message where we need to copy the dueTime from the original
 public QueuedMessage(AbstractEvent abstractEvent)
 {
     this.abstractEvent = abstractEvent;
 }
Ejemplo n.º 6
0
 public QueuedMessage(int secondsDelay, AbstractEvent abstractEvent)
 {
     this.dueTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (secondsDelay * 1000);
     this.abstractEvent = abstractEvent;
 }