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.
23 lines
825 B
23 lines
825 B
1 year ago
|
using System;
|
||
|
|
||
|
namespace gaemstone.ECS;
|
||
|
|
||
|
[Tag]
|
||
|
public struct Relation { }
|
||
|
|
||
|
/// <summary>
|
||
|
/// Marked entity represents a relationship type.
|
||
|
/// It may be used as the "relation" in a pair.
|
||
|
/// </summary>
|
||
|
/// <remarks>
|
||
|
/// The relationship may have component data associated with
|
||
|
/// it when added to an entity under these circumstances:
|
||
|
/// <list type="bullet">
|
||
|
/// <item>If marked as a <see cref="TagAttribute"/>, does not carry data.</item>
|
||
|
/// <item>If marked as a <see cref="ComponentAttribute"/>, carries the relation's data.</item>
|
||
|
/// <item>If marked with neither, will carry the target's data, if it's a component.</item>
|
||
|
/// </list>
|
||
|
/// </remarks>
|
||
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum)]
|
||
|
public class RelationAttribute : Attribute, ICreateEntityAttribute { }
|