summaryrefslogtreecommitdiff
path: root/ecs/src
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-08-15 19:18:03 +0200
committerHampusM <hampus@hampusmat.com>2024-08-15 19:18:03 +0200
commit7da4b6acf1c08a87a709698d06a4237b38d0aa8a (patch)
tree077956ca00c688cdca2ed77cc4cf9bdde5ce34b1 /ecs/src
parent30f7ab671486c95287fb8d1c791aabef7007987c (diff)
feat(ecs): add function to set related-to relationship entity
Diffstat (limited to 'ecs/src')
-rw-r--r--ecs/src/relationship.rs6
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;
+ }
}