summaryrefslogtreecommitdiff
path: root/ecs/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-06-22 16:15:12 +0200
committerHampusM <hampus@hampusmat.com>2024-06-22 16:15:12 +0200
commit9b6611cd11199346cbe1f14ad44930347f90dec2 (patch)
tree6c9c3717878e1603b99686f6eccda113828ae2a5 /ecs/src/lib.rs
parenta0dce2164cf348416ea15c63c5baa52afa66508f (diff)
feat(ecs): add query options filter entities
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r--ecs/src/lib.rs4
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)
}