diff options
Diffstat (limited to 'ecs/src')
-rw-r--r-- | ecs/src/component/storage.rs | 2 | ||||
-rw-r--r-- | ecs/src/query.rs | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/ecs/src/component/storage.rs b/ecs/src/component/storage.rs index cb219f1..e939ba7 100644 --- a/ecs/src/component/storage.rs +++ b/ecs/src/component/storage.rs @@ -27,7 +27,7 @@ pub struct Storage impl Storage { - pub fn find_entities<CompMetadataList>( + pub fn iter_archetypes_with_comps<CompMetadataList>( &self, mut comp_metadata_list: CompMetadataList, ) -> ArchetypeRefIter<'_> diff --git a/ecs/src/query.rs b/ecs/src/query.rs index c4b4cf0..3905fb8 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -50,7 +50,7 @@ where world: self.world, entities: self .component_storage - .find_entities(Comps::metadata()) + .iter_archetypes_with_comps(Comps::metadata()) .map( (|archetype| { repeat_n(archetype, archetype.entity_cnt()) @@ -75,7 +75,7 @@ where world: self.world, entities: self .component_storage - .find_entities(Comps::metadata()) + .iter_archetypes_with_comps(Comps::metadata()) .map( (|archetype| { repeat_n(archetype, archetype.entity_cnt()) @@ -107,7 +107,7 @@ where world: self.world, entities: self .component_storage - .find_entities( + .iter_archetypes_with_comps( Comps::metadata() .into_iter() .chain(extra_components) @@ -131,7 +131,7 @@ where { Some( self.component_storage - .find_entities(Comps::metadata()) + .iter_archetypes_with_comps(Comps::metadata()) .flat_map(|archetype| archetype.entities()) .filter(|entity| OptionsT::entity_filter(entity.components())) .nth(entity_index)? |