summaryrefslogtreecommitdiff
path: root/ecs/src/component
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/component')
-rw-r--r--ecs/src/component/storage.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs
index dcf0181..b46d053 100644
--- a/ecs/src/component/storage.rs
+++ b/ecs/src/component/storage.rs
@@ -414,6 +414,11 @@ impl Archetype
EntityIter { iter: self.entities.iter() }
}
+ pub fn entity_cnt(&self) -> usize
+ {
+ self.entities.len()
+ }
+
pub fn get_index_for_component(&self, component_id: Uid) -> Option<usize>
{
self.component_ids.get(&component_id).copied()