summaryrefslogtreecommitdiff
path: root/ecs/src
diff options
context:
space:
mode:
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;
+ }
}