From 9ab42afb0b86a2cc33c88e205d9edbba701ee321 Mon Sep 17 00:00:00 2001 From: copygirl Date: Tue, 27 Dec 2022 18:21:06 +0100 Subject: [PATCH] Add Identifier.AsEntity method --- src/gaemstone.ECS/Identifier.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gaemstone.ECS/Identifier.cs b/src/gaemstone.ECS/Identifier.cs index 672beba..516bd68 100644 --- a/src/gaemstone.ECS/Identifier.cs +++ b/src/gaemstone.ECS/Identifier.cs @@ -26,6 +26,8 @@ public readonly struct Identifier ((relation.Value.Data << 32) & ECS_COMPONENT_MASK) | ( target.Value.Data & ECS_ENTITY_MASK ))); + public EntityRef? AsEntity(World world) + => new IdentifierRef(world, this).AsEntity(); public (EntityRef Relation, EntityRef Target)? AsPair(World world) => new IdentifierRef(world, this).AsPair();