namespace DxMessaging.Core.Messages { using System; /// /// Message from a specific entity but for any listener. /// /// /// BroadcastMessages should be thought of as reactionary. Things like "EntityX has died", "EntityX has picked up ItemZ", /// or "EntityX has lost 1 health". /// Inheritance should be completely flat. Ie, IBroadcastMessage should be the direct parent of every implementer. /// public interface IBroadcastMessage : IMessage { } /// /// No-alloc BroadcastMessages. Derive from this type to not have your messages boxed (if they are structs). /// /// public readonly MyCoolStruct : IBroadCastMessage{MyCoolStruct} /// /// /// Concrete type of the derived. Should be the derived type and nothing else. public interface IBroadcastMessage : IBroadcastMessage where T : IBroadcastMessage { Type IMessage.MessageType => typeof(T); } }