diff --git a/encompass-cs/Engine.cs b/encompass-cs/Engine.cs
index 4c57a00..c2a0532 100644
--- a/encompass-cs/Engine.cs
+++ b/encompass-cs/Engine.cs
@@ -242,7 +242,15 @@ namespace Encompass
}
///
- /// Returns a Component with the specified Component Type and ID. If multiples exist, an arbitrary Component is returned.
+ /// Returns all of the components of the specified type including an Entity reference for each Component.
+ ///
+ protected IEnumerable<(Guid, TComponent, Entity)> ReadComponentsIncludingEntity() where TComponent : struct, IComponent
+ {
+ return ReadComponents().Select((tuple) => (tuple.Item1, tuple.Item2, GetEntityByComponentID(tuple.Item1)));
+ }
+
+ ///
+ /// Returns a Component with the specified Component Type. If multiples exist, an arbitrary Component is returned.
///
protected (Guid, TComponent) ReadComponent() where TComponent : struct, IComponent
{
@@ -266,6 +274,15 @@ namespace Encompass
}
}
+ ///
+ /// Returns a component of the specified type including its Entity reference. If multiples exist, an arbitrary Component is returned.
+ ///
+ protected (Guid, TComponent, Entity) ReadComponentIncludingEntity() where TComponent : struct, IComponent
+ {
+ var (id, component) = ReadComponent();
+ return (id, component, GetEntityByComponentID(id));
+ }
+
///
/// Returns true if any Component with the specified Component Type exists.
///