diff options
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r-- | ecs/src/lib.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs index cb2059b..9b787a2 100644 --- a/ecs/src/lib.rs +++ b/ecs/src/lib.rs @@ -18,11 +18,13 @@ use crate::extension::{Collector as ExtensionCollector, Extension}; use crate::lock::{Lock, WriteGuard}; use crate::phase::{Phase, START as START_PHASE}; use crate::query::flexible::Query as FlexibleQuery; -use crate::query::options::{Not, Options as QueryOptions, With}; +use crate::query::term::Without; use crate::query::{ ComponentIter, - TermSequence as QueryTermSequence, + TermWithFieldTuple as QueryTermWithFieldTuple, + TermWithoutFieldTuple as QueryTermWithoutFieldTuple, Terms as QueryTerms, + TermsBuilderInterface, }; use crate::relationship::{ChildOf, DependsOn, Relationship}; use crate::sole::Sole; @@ -173,10 +175,10 @@ impl World extension.collect(extension_collector); } - pub fn query<Terms, OptionsT>(&self) -> Query<Terms, OptionsT> + pub fn query<FieldTerms, FieldlessTerms>(&self) -> Query<FieldTerms, FieldlessTerms> where - Terms: QueryTermSequence, - OptionsT: QueryOptions, + FieldTerms: QueryTermWithFieldTuple, + FieldlessTerms: QueryTermWithoutFieldTuple, { Query::new(self) } @@ -283,7 +285,7 @@ impl World fn perform_phases(&self) { let phase_query = - self.query::<(&Phase,), Not<With<Relationship<ChildOf, Phase>>>>(); + self.query::<(&Phase,), (Without<Relationship<ChildOf, Phase>>,)>(); for (phase_euid, (_,)) in phase_query.iter_with_euids() { if phase_euid == *START_PHASE { @@ -492,8 +494,7 @@ impl World .build(), ); - for (system,) in - ComponentIter::<(&SystemComponent,), _>::new(self, query.iter::<()>()) + for (system,) in ComponentIter::<(&SystemComponent,), _>::new(self, query.iter()) { unsafe { system.system.run(self); |