namespace DxMessaging.Core.Messages { using System; /// /// Used to specify general-purposes messages that aren't meant to be sent to specific entity. /// /// /// UntargetedMessages should be thought of as game-wide, global information. Things like /// "The world has been regenerated." or "The video settings have been updated to this resolution". /// Inheritance should be completely flat. Ie, UntargetedMessages should be the direct parent of every implementer. /// public interface IUntargetedMessage : IMessage { } /// /// No-alloc UntargetedMessages. Derive from this type to not have your messages boxed (if they are structs). /// /// public readonly MyCoolStruct : IUntargetedMessage{MyCoolStruct} /// /// /// Concrete type of the derived. Should be the derived type and nothing else. public interface IUntargetedMessage : IUntargetedMessage where T : IUntargetedMessage { Type IMessage.MessageType => typeof(T); } }