From 7da4b6acf1c08a87a709698d06a4237b38d0aa8a Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 15 Aug 2024 19:18:03 +0200 Subject: feat(ecs): add function to set related-to relationship entity --- ecs/src/relationship.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ecs/src/relationship.rs') diff --git a/ecs/src/relationship.rs b/ecs/src/relationship.rs index b7c5c02..82c9e70 100644 --- a/ecs/src/relationship.rs +++ b/ecs/src/relationship.rs @@ -165,4 +165,10 @@ where Some(component) } + + /// Changes the related-to entity to the entity with the given UID: + pub fn set_entity(&mut self, entity_uid: EntityUid) + { + self.relationship_comp.entity_uid = entity_uid; + } } -- cgit v1.2.3-18-g5258