/// <summary> /// Handles a received message /// </summary> /// <param name="message">The message to handle</param> /// <returns>If the message was handled</returns> protected virtual bool HandleMessage(QdmsMessage message) { if (message is SubtitleMessage) { SubtitleMessage subMessage = (SubtitleMessage)message; if (subMessage.Priority >= SubtitlePriority) { SubtitlePriority = subMessage.Priority; SubtitleTimer = subMessage.HoldTime; SubtitleText.text = subMessage.UseSubstitution ? Sub.Macro(subMessage.Contents) : subMessage.Contents; } return(true); } else if (message is HUDClearMessage) { ClearHudMessages(); } else if (message is HUDPushMessage) { AppendHudMessage(Sub.Macro(((HUDPushMessage)message).Contents)); return(true); } return(false); }
/// <summary> /// Handles a received message /// </summary> /// <param name="message">The message to handle</param> /// <returns>If the message was handled</returns> protected virtual bool HandleMessage(QdmsMessage message) { if (message is SubtitleMessage) { SubtitleMessage subMessage = (SubtitleMessage)message; if (subMessage.Priority >= SubtitlePriority) { SubtitlePriority = subMessage.Priority; SubtitleTimer = subMessage.HoldTime; SubtitleText.text = subMessage.UseSubstitution ? Sub.Macro(subMessage.Contents) : subMessage.Contents; } return(true); } return(false); }