diff options
author | HampusM <hampus@hampusmat.com> | 2024-08-15 19:18:03 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-08-15 19:18:03 +0200 |
commit | 7da4b6acf1c08a87a709698d06a4237b38d0aa8a (patch) | |
tree | 077956ca00c688cdca2ed77cc4cf9bdde5ce34b1 | |
parent | 30f7ab671486c95287fb8d1c791aabef7007987c (diff) |
feat(ecs): add function to set related-to relationship entity
-rw-r--r-- | ecs/src/relationship.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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; + } } |