From ff3be9636b5e66b8f55c80d9e10a87d5e66a3334 Mon Sep 17 00:00:00 2001 From: Evan Hemsley <2342303+ehemsley@users.noreply.github.com> Date: Fri, 12 Jul 2019 21:48:08 -0700 Subject: [PATCH] adds GetEntityIDByComponentID and GetEntityByComponentID to Renderer --- encompass-cs/Renderer.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/encompass-cs/Renderer.cs b/encompass-cs/Renderer.cs index d2d82d6..1e6dee8 100644 --- a/encompass-cs/Renderer.cs +++ b/encompass-cs/Renderer.cs @@ -29,6 +29,16 @@ namespace Encompass return entityManager.GetEntity(entityID); } + protected Guid GetEntityIDByComponentID(Guid componentID) + { + return componentManager.GetEntityIDByComponentID(componentID); + } + + protected Entity GetEntityByComponentID(Guid componentID) + { + return GetEntity(GetEntityIDByComponentID(componentID)); + } + protected IEnumerable> ReadComponents() where TComponent : struct, IComponent { return componentManager.GetActiveComponentsByType();