|
|
@ -19,6 +19,18 @@ public interface ICreateEntityAttribute { } |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)] |
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)] |
|
|
|
public class PrivateAttribute : Attribute { } |
|
|
|
public class PrivateAttribute : Attribute { } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
|
|
|
|
/// A singleton is a single instance of a tag or component that can be retrieved |
|
|
|
|
|
|
|
/// without explicitly specifying an entity in a query, where it is equivalent |
|
|
|
|
|
|
|
/// to <see cref="SourceAttribute{}"/> with itself as the generic type parameter. |
|
|
|
|
|
|
|
/// </summary> |
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)] |
|
|
|
|
|
|
|
public class SingletonAttribute : Attribute |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
/// <summary> Whether to add the entity to itself on registration. </summary> |
|
|
|
|
|
|
|
public bool AutoAdd { get; init; } = false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Register the proxied type instead of the one marked with this attribute. |
|
|
|
/// Register the proxied type instead of the one marked with this attribute. |
|
|
|
/// This can be used to make types not registered in a module available, |
|
|
|
/// This can be used to make types not registered in a module available, |
|
|
|