public UnconfirmedTextMessageRequest(ObjectId textMessageSourceDevice, Option<MessageClassType> messageClass, MessagePriorityType messagePriority, string message)
 {
     this.TextMessageSourceDevice = textMessageSourceDevice;
     this.MessageClass = messageClass;
     this.MessagePriority = messagePriority;
     this.Message = message;
 }
 /// <summary>
 /// Creates an IdMsgPrio for a string with optional parameters
 /// </summary>
 /// <param name="msg">the message to be sent</param>
 /// <param name="id">the id of the player to send it to</param>
 /// <param name="prio">the urgency of the message</param>
 /// <param name="duration">how long the message should remain visible</param>
 /// <returns>The fully formed IdMsgPrio</returns>
 public static IdMsgPrio ToIdMsgPrio(this string msg, int id, MessagePriorityType prio = MessagePriorityType.Alarm, float duration = 3.0F)
 {
     return(new IdMsgPrio()
     {
         id = id,
         msg = msg,
         prio = (byte)prio,
         time = duration
     });
 }
예제 #3
0
 /// <summary>
 /// Simple way to send a message to the specified player
 /// </summary>
 /// <param name="playerId"></param>
 /// <param name="message"></param>
 /// <param name="priority"></param>
 protected void MessagePlayer(int playerId, string message, MessagePriorityType priority = MessagePriorityType.Message)
 {
   var msg = message.ToIdMsgPrio(playerId, priority);
   this.Request_InGameMessage_SinglePlayer(msg);
 }
예제 #4
0
 public ConfirmedTextMessageRequest(ObjectId textMessageSourceDevice, Option <MessageClassType> messageClass, MessagePriorityType messagePriority, string message)
 {
     this.TextMessageSourceDevice = textMessageSourceDevice;
     this.MessageClass            = messageClass;
     this.MessagePriority         = messagePriority;
     this.Message = message;
 }