diff options
author | HampusM <hampus@hampusmat.com> | 2024-06-06 12:50:05 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-06-06 12:50:20 +0200 |
commit | cb1ff29c8c7fa77bbb4e532eaa7e45df717a58ef (patch) | |
tree | 44cbc9c821609dc117b26369c3872386ab533f55 /ecs/src/query.rs | |
parent | 43079a8dc9e2b608f47c5919f45c1f1661f11a2e (diff) |
refactor(ecs): move ComponentStorage to it's own module
Diffstat (limited to 'ecs/src/query.rs')
-rw-r--r-- | ecs/src/query.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ecs/src/query.rs b/ecs/src/query.rs index ffab105..90e6169 100644 --- a/ecs/src/query.rs +++ b/ecs/src/query.rs @@ -199,7 +199,7 @@ where fn next(&mut self) -> Option<Self::Item> { - let (matching_entity_index, matching_entity) = + let (matching_entity_index, matching_entity_components) = self.component_storage.find_entity_with_components( self.current_entity_index, &self.component_type_ids, @@ -208,7 +208,7 @@ where self.current_entity_index = matching_entity_index + 1; Some(Comps::from_components( - matching_entity.components.iter().map(|component| component), + matching_entity_components.iter().map(|component| component), )) } } |