oecs-sharp/OECS/IRelationship.cs

18 lines
575 B
C#
Raw Normal View History

namespace OECS;
/// <summary>
/// Marker interface for components that represent a directed relationship
/// between two entities. The component is stored on the source entity
/// (the entity it's added to) and points to the <see cref="Target"/> entity.
///
/// The <see cref="World"/> automatically maintains a reverse index so that
/// all sources pointing to a given target can be looked up efficiently.
/// </summary>
public interface IRelationship
{
/// <summary>
/// The entity that this relationship points to.
/// </summary>
Entity Target { get; }
}