adds GetEntityIDByComponentID and GetEntityByComponentID to Renderer

pull/5/head
Evan Hemsley 2019-07-12 21:48:08 -07:00
parent c946251302
commit ff3be9636b
1 changed files with 10 additions and 0 deletions

View File

@ -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>();