adds GetEntityIDByComponentID and GetEntityByComponentID to Renderer
parent
c946251302
commit
ff3be9636b
|
@ -29,6 +29,16 @@ namespace Encompass
|
||||||
return entityManager.GetEntity(entityID);
|
return entityManager.GetEntity(entityID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected Guid GetEntityIDByComponentID(Guid componentID)
|
||||||
|
{
|
||||||
|
return componentManager.GetEntityIDByComponentID(componentID);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Entity GetEntityByComponentID(Guid componentID)
|
||||||
|
{
|
||||||
|
return GetEntity(GetEntityIDByComponentID(componentID));
|
||||||
|
}
|
||||||
|
|
||||||
protected IEnumerable<ValueTuple<Guid, TComponent>> ReadComponents<TComponent>() where TComponent : struct, IComponent
|
protected IEnumerable<ValueTuple<Guid, TComponent>> ReadComponents<TComponent>() where TComponent : struct, IComponent
|
||||||
{
|
{
|
||||||
return componentManager.GetActiveComponentsByType<TComponent>();
|
return componentManager.GetActiveComponentsByType<TComponent>();
|
||||||
|
|
Loading…
Reference in New Issue