From cb1ff29c8c7fa77bbb4e532eaa7e45df717a58ef Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 6 Jun 2024 12:50:05 +0200 Subject: refactor(ecs): move ComponentStorage to it's own module --- ecs/src/query.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ecs/src/query.rs') 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 { - 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), )) } } -- cgit v1.2.3-18-g5258