18 lines
1.0 KiB
C#
18 lines
1.0 KiB
C#
|
namespace MoonTools.ECS
|
||
|
{
|
||
|
public abstract class Manipulator : EntityComponentReader
|
||
|
{
|
||
|
public Manipulator(World world) : base(world)
|
||
|
{
|
||
|
}
|
||
|
|
||
|
protected Entity CreateEntity() => World.CreateEntity();
|
||
|
protected void Set<TComponent>(in Entity entity, in TComponent component) where TComponent : unmanaged => World.Set<TComponent>(entity, component);
|
||
|
protected void Remove<TComponent>(in Entity entity) where TComponent : unmanaged => World.Remove<TComponent>(entity);
|
||
|
protected void Relate<TRelationKind>(in Entity entityA, in Entity entityB, TRelationKind relationData) where TRelationKind : unmanaged => World.Relate(entityA, entityB, relationData);
|
||
|
protected void Unrelate<TRelationKind>(in Entity entityA, in Entity entityB) where TRelationKind : unmanaged => World.Unrelate<TRelationKind>(entityA, entityB);
|
||
|
protected void UnrelateAll<TRelationKind>(in Entity entity) where TRelationKind : unmanaged => World.UnrelateAll<TRelationKind>(entity);
|
||
|
protected void Destroy(in Entity entity) => World.Destroy(entity);
|
||
|
}
|
||
|
}
|