예제 #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;
 }
예제 #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;
 }
예제 #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);
 }
예제 #4
0
 public void queueClip(String eventName, int secondsDelay, AbstractEvent abstractEvent)
 {
     queueClip(eventName, secondsDelay, abstractEvent, PearlsOfWisdom.PearlType.NONE, 0);
 }
예제 #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;
 }
예제 #6
0
 public QueuedMessage(int secondsDelay, AbstractEvent abstractEvent)
 {
     this.dueTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond + (secondsDelay * 1000);
     this.abstractEvent = abstractEvent;
 }