diff options
author | HampusM <hampus@hampusmat.com> | 2024-06-22 16:15:12 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-06-22 16:15:12 +0200 |
commit | 9b6611cd11199346cbe1f14ad44930347f90dec2 (patch) | |
tree | 6c9c3717878e1603b99686f6eccda113828ae2a5 /ecs/src/lib.rs | |
parent | a0dce2164cf348416ea15c63c5baa52afa66508f (diff) |
feat(ecs): add query options filter entities
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 4 |
1 files changed, 3 insertions, 1 deletions
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<Comps>(&self) -> Query<Comps> + pub fn query<Comps, OptionsT>(&self) -> Query<Comps, OptionsT> where Comps: ComponentSequence, + OptionsT: QueryOptions, { Query::new(&self.data.component_storage) } |