You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1013 B
32 lines
1013 B
using System; |
|
|
|
namespace gaemstone.ECS; |
|
|
|
[AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method)] |
|
public class SourceAttribute : Attribute |
|
{ |
|
public Type Type { get; } |
|
// TODO: Support path as source too. |
|
internal SourceAttribute(Type type) => Type = type; |
|
} |
|
public class SourceAttribute<TEntity> : SourceAttribute |
|
{ public SourceAttribute() : base(typeof(TEntity)) { } } |
|
|
|
|
|
// Parameters types marked with [Tag] are equivalent to [Has]. |
|
[AttributeUsage(AttributeTargets.Parameter)] |
|
public class HasAttribute : Attribute { } |
|
|
|
// Parameters with "in" modifier are equivalent to [In]. |
|
[AttributeUsage(AttributeTargets.Parameter)] |
|
public class InAttribute : Attribute { } |
|
|
|
// Parameters with "out" modifier are equivalent to [Out]. |
|
[AttributeUsage(AttributeTargets.Parameter)] |
|
public class OutAttribute : Attribute { } |
|
|
|
[AttributeUsage(AttributeTargets.Parameter)] |
|
public class OrAttribute : Attribute { } |
|
|
|
[AttributeUsage(AttributeTargets.Parameter)] |
|
public class NotAttribute : Attribute { }
|
|
|