From 9b6611cd11199346cbe1f14ad44930347f90dec2 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 22 Jun 2024 16:15:12 +0200 Subject: feat(ecs): add query options filter entities --- ecs/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ecs/src/lib.rs') diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index b883171..1f745b9 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -15,6 +15,7 @@ use crate::component::{Component, Id as ComponentId, Sequence as ComponentSequen use crate::event::{Event, Id as EventId, Ids, Sequence as EventSequence}; use crate::extension::{Collector as ExtensionCollector, Extension}; use crate::lock::Lock; +use crate::query::options::Options as QueryOptions; use crate::sole::Sole; use crate::system::{System, TypeErased as TypeErasedSystem}; use crate::type_name::TypeName; @@ -121,9 +122,10 @@ impl World drop(event); } - pub fn query(&self) -> Query + pub fn query(&self) -> Query where Comps: ComponentSequence, + OptionsT: QueryOptions, { Query::new(&self.data.component_storage) } -- cgit v1.2.3-18-g5258