QueryEntityComponentDeep<T extends App<T> > class
A query over all Comp descendants of an Entity, including those attached to nested child entities.
For shallow (direct-only) component queries use QueryEntityComponent.
- Inheritance
-
- Object
- ECSBase<
T> - QueryComponentManagable<
T, Comp< T> , QueryEntityComponentDeep<T> > - QueryEntityComponentDeep
Constructors
-
QueryEntityComponentDeep(T app, Entity<
T> entity)
Properties
- app → T
-
finalinherited
- backend → UnhingedBackend
-
Shorthand for App.backend.
no setterinherited
- Count → int
-
Query-likeReturns the number of matching elements.no setterinherited -
draw
→ Drawers<
T> -
Shorthand for App.draw.
no setterinherited
-
entity
→ Entity<
T> -
final
- Exists → bool
-
Query-likeAlias for IsNotEmpty.trueif at least one element matches.no setterinherited -
First
→ Comp<
T> -
Query-likeReturns the first matching element. Throws if none exist.no setterinherited -
FirstOrNull
→ Comp<
T> ? -
Query-likeReturns the first matching element, ornullif the result set is empty.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Per-type unique identifier, auto-assigned in the constructor.
no setterinherited
-
input
→ InputSystem<
T> -
Shorthand for App.input.
no setterinherited
- isClonable → bool
-
Check this before calling clone:
if (obj.isClonable) obj.clone();no setterinherited - isClone ↔ bool
-
Whether this object is a clone of another.
getter/setter pairinherited
- isCloned ↔ bool
-
Whether this object has been cloned at least once.
getter/setter pairinherited
- isCloning ↔ bool
-
Whether this object is currently mid-clone.
getter/setter pairinherited
- IsEmpty → bool
-
Query-liketrueif no elements match.no setterinherited - IsNotEmpty → bool
-
Query-liketrueif at least one element matches.no setterinherited - isOriginal → bool
-
Whether this object is an original (not a clone).
no setterinherited
-
Last
→ Comp<
T> -
Query-likeReturns the last matching element. Throws if none exist.no setterinherited -
LastOrNull
→ Comp<
T> ? -
Query-likeReturns the last matching element, ornullif the result set is empty.no setterinherited - name ↔ String
-
Human-readable name, defaults to
<runtimeType>_<id>.getter/setter pairinherited - namedId → String
-
Per-type unique String identifier, auto-assigned in the constructor.
Defaults to
<runtimeType>_<id>.no setterinherited -
parent
↔ ECSBase<
T> ? -
The parent object in the ECS tree, if any.
getter/setter pairinherited
-
queryableList
→ Iterable<
Comp< T> > -
The default pool of elements to query when no explicit From source is
provided. Implemented by concrete subclasses.
no setteroverride
-
renderer
→ Renderer<
T> -
Shorthand for App.renderer.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scene
→ Scene<
T> -
Shorthand for App.currentScene.
no setterinherited
- sceneBounds → Bounds
-
no setterinherited
- sceneHeight → double
-
no setterinherited
- sceneSize → Vector2D
-
no setterinherited
- sceneWidth → double
-
no setterinherited
- screenHeight → double
-
Shorthand for App's height.
no setterinherited
- screenSize → Vector2D
-
Shorthand for App.screenSize.
no setterinherited
- screenWidth → double
-
Shorthand for App's width.
no setterinherited
-
self
→ QueryEntityComponentDeep<
T> -
This object cast to
T.no setterinherited -
time
→ AppTime<
T> -
Shorthand for App.time.
no setterinherited
Methods
-
And(
[QueryEntityComponentDeep< T> ? other]) → QueryEntityComponentDeep<T> -
Query-likeMerges all groups fromotherinto this query (AND at the group level).inherited -
callback(
void callback()) → void -
inherited
-
clone<
X extends E> ([Cloner< T> ? cloner]) → X -
Produces a clone of this object.
inherited
-
cloneInto<
X extends E> (X target, [Cloner< T> ? cloner]) → X -
inherited
-
Collect<
A extends E> () → Iterable< A> -
Query-likeReturns all matching elements as a lazy Iterable.inherited -
createClone(
QueryEntityComponentDeep< T> newInstance, [Cloner<T> ? cloner]) → QueryEntityComponentDeep<T> -
Override to customize how state is copied into
newInstance.inherited -
createInstance(
) → QueryEntityComponentDeep< T> -
Override to provide a fresh uninitialized instance of this type.
override
-
DoAll<
A extends E> (void fn(Iterable< A> entities)) → void -
Query-likePasses the full result Iterable tofn.inherited -
DoFirst<
A extends E> (void fn(A entity)) → void -
Query-likeCallsfnwith the first matching element. Does nothing if the result set is empty.inherited -
DoFirstWith<
C extends Comp< (T> >void fn(Comp< T> entity, C c)) → void -
Query-likeCallsfnwith the first matching element and itsCcomponent. Does nothing if the result set is empty.inherited -
DoFirstWith2<
A extends Comp< (T> , B extends Comp<T> >void fn(Comp< T> entity, A a, B b)) → void -
Query-likeCallsfnwith the first matching element and itsAandBcomponents. Does nothing if the result set is empty.inherited -
DoFirstWith3<
A extends Comp< (T> , B extends Comp<T> , C extends Comp<T> >void fn(Comp< T> entity, A a, B b, C c)) → void -
Query-likeCallsfnwith the first matching element and itsA,B, andCcomponents. Does nothing if the result set is empty.inherited -
DoForEach<
A extends E> (void fn(A entity)) → void -
Query-likeCallsfnonce for each matching element.inherited -
DoForEachWith<
C extends Comp< (T> >void fn(Comp< T> entity, C a)) → void -
Query-likeFor each element that hasC, callsfnwith the element and itsCinstance. Implicitly adds a With<C>filter.inherited -
DoForEachWith2<
A extends Comp< (T> , B extends Comp<T> >void fn(Comp< T> entity, A a, B b)) → void -
Query-likeFor each element that has bothAandB, callsfnwith the element and both component instances. Implicitly adds a With2<A, B>filter.inherited -
DoForEachWith3<
A extends Comp< (T> , B extends Comp<T> , C extends Comp<T> >void fn(Comp< T> entity, A a, B b, C c)) → void -
Query-likeFor each element that hasA,B, andC, callsfnwith the element and all three component instances. Implicitly adds a With3<A, B, C>filter.inherited -
DoLast<
A extends E> (void fn(A entity)) → void -
Query-likeCallsfnwith the last matching element. Does nothing if the result set is empty.inherited -
DoLastWith<
C extends Comp< (T> >void fn(Comp< T> entity, C c)) → void -
Query-likeCallsfnwith the last matching element and itsCcomponent. Does nothing if the result set is empty.inherited -
DoLastWith2<
A extends Comp< (T> , B extends Comp<T> >void fn(Comp< T> entity, A a, B b)) → void -
Query-likeCallsfnwith the last matching element and itsAandBcomponents. Does nothing if the result set is empty.inherited -
DoLastWith3<
A extends Comp< (T> , B extends Comp<T> , C extends Comp<T> >void fn(Comp< T> entity, A a, B b, C c)) → void -
Query-likeCallsfnwith the last matching element and itsA,B, andCcomponents. Does nothing if the result set is empty.inherited -
Except<
C extends Comp< (T> >) → QueryEntityComponentDeep< T> -
Query-likeExcludes elements that have componentC.inherited -
Except2<
A extends Comp< (T> , B extends Comp<T> >) → QueryEntityComponentDeep< T> -
Query-likeExcludes elements that have eitherAorB.inherited -
Except3<
A extends Comp< (T> , B extends Comp<T> , C extends Comp<T> >) → QueryEntityComponentDeep< T> -
Query-likeExcludes elements that have any ofA,B, orC.inherited -
FirstAs<
X extends E> () → X -
Query-likeReturns the first element of typeX, skipping any non-matching elements. Throws a StateError if no element of typeXexists.inherited -
FirstAsOrNull<
X extends E> () → X? -
Query-likeReturns the first element of typeX, skipping any non-matching elements, ornullif none exists.inherited -
From(
List< Comp< entities) → QueryEntityComponentDeep<T> >T> -
Query-likeRestricts the query to a specific list ofentitiesinstead of the default queryableList.inherited -
getAncestors(
) → Iterable< ECSBase< T> > -
Returns every ancestor of this component, from immediate parent up to the root.
inherited
-
getClones(
) → Iterable< QueryEntityComponentDeep< T> > -
Returns all clones produced from this object.
inherited
-
getDepth(
) → int -
Returns the depth/level in the hierarchy.
inherited
-
getParentAs<
P extends ECSBase< (T> >) → P? -
Returns parent cast to
P, ornullif the cast would fail.inherited -
getPath(
) → List< ECSBase< T> > -
Returns the path from the root down to this one, inclusive.
inherited
-
hasParentOf<
P extends ECSBase< (T> >) → bool -
Whether parent is of type
P.inherited -
IndexOf(
Comp< T> e) → int -
Query-likeReturns the index ofein the resolved result list, or-1if not found.inherited -
LastAs<
X extends E> () → X -
Query-likeReturns the last element of typeX, skipping any non-matching elements. Throws a StateError if no element of typeXexists.inherited -
LastAsOrNull<
X extends E> () → X? -
Query-likeReturns the last element of typeX, skipping any non-matching elements, ornullif none exists.inherited -
listenOnAfterClone(
void fn(QueryEntityComponentDeep< T> copy, [Cloner<T> ? cloner])) → QueryEntityComponentDeep<T> -
Registers
fnas an after-clone listener.inherited -
listenOnBeforeClone(
bool fn(QueryEntityComponentDeep< T> copy, [Cloner<T> ? cloner])) → QueryEntityComponentDeep<T> -
Registers
fnas a before-clone listener.inherited -
listenOnClone(
void fn(QueryEntityComponentDeep< T> copy, [Cloner<T> ? cloner])) → QueryEntityComponentDeep<T> -
Registers
fnas a clone listener.inherited -
Map<
X> (X toElement(Comp< T> e)) → Iterable<X> -
Query-likeProjects matching elements usingtoElement.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
Not(
) → QueryEntityComponentDeep< T> -
Query-likeOpens a new negated filter group.inherited -
On<
C extends E> () → QueryEntityComponentDeep< T> -
Query-likeKeeps only elements whose runtime type isC.inherited -
onAfterClone(
QueryEntityComponentDeep< T> copy, [Cloner<T> ? cloner]) → void -
Override to react after cloning has completed.
inherited
-
onBeforeClone(
QueryEntityComponentDeep< T> copy, [Cloner<T> ? cloner]) → bool -
Override to cancel cloning from within the class.
inherited
-
onClone(
QueryEntityComponentDeep< T> copy, [Cloner<T> ? cloner]) → void -
Override to react when cloning is about to complete.
inherited
-
onCloned(
QueryEntityComponentDeep< T> original) → void -
Called on the copy after cloning completes, with a reference to
original.inherited -
onSelf(
void fn(QueryEntityComponentDeep< T> original)) → QueryEntityComponentDeep<T> -
Calls
fnwith self and returns self, for fluent chaining.inherited -
Or(
[QueryEntityComponentDeep< T> ? other]) → QueryEntityComponentDeep<T> -
Query-likeOpens a new filter group (OR semantics between groups).inherited -
run(
Task< T> task) → void -
inherited
-
task(
Task< T> task) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uniqKey(
String key) → String -
Returns a key namespaced to this object's namedId.
inherited
-
whenClone(
QueryEntityComponentDeep< T> fn(QueryEntityComponentDeep<T> newInstance, [Cloner<T> ? cloner])) → QueryEntityComponentDeep<T> -
Registers
fnas the clone factory, replacing the default clone behavior.inherited -
whenCloned(
QueryEntityComponentDeep< T> fn(QueryEntityComponentDeep<T> self, QueryEntityComponentDeep<T> copy)) → QueryEntityComponentDeep<T> -
Registers
fnto run after the clone is produced.inherited -
whenCreateInstance(
QueryEntityComponentDeep< T> fn(QueryEntityComponentDeep<T> self)) → QueryEntityComponentDeep<T> -
Registers
fnas the instance factory used during cloning.inherited -
Where(
bool fn(Comp< T> entity)) → QueryEntityComponentDeep<T> -
Query-likeKeeps only elements for whichfnreturnstrue.inherited -
WhereType<
X> () → QueryEntityComponentDeep< T> -
Query-likeKeeps only elements matching given typeX.inherited -
With<
C extends Comp< (T> >) → QueryEntityComponentDeep< T> -
Query-likeKeeps only elements that have componentCattached.inherited -
With2<
A extends Comp< (T> , B extends Comp<T> >) → QueryEntityComponentDeep< T> -
Query-likeKeeps only elements that have both componentsAandB.inherited -
With2Where<
A extends Comp< (T> , B extends Comp<T> >bool fn(Comp< T> entity, A a, B b)) → QueryEntityComponentDeep<T> -
Query-likeKeeps only elements that have bothAandBand for whichfnreturnstrue.inherited -
With3<
A extends Comp< (T> , B extends Comp<T> , C extends Comp<T> >) → QueryEntityComponentDeep< T> -
Query-likeKeeps only elements that have all three componentsA,B, andC.inherited -
With3Where<
A extends Comp< (T> , B extends Comp<T> , C extends Comp<T> >bool fn(Comp< T> entity, A a, B b, C c)) → QueryEntityComponentDeep<T> -
Query-likeKeeps only elements that have all three ofA,B, andCand for whichfnreturnstrue.inherited -
WithAny<
A extends Comp< (T> , B extends Comp<T> >) → QueryEntityComponentDeep< T> -
Query-likeKeeps only elements that have at least one ofAorB.inherited -
WithWhere<
C extends Comp< (T> >bool fn(Comp< T> entity, C c)) → QueryEntityComponentDeep<T> -
Query-likeKeeps only elements that haveCand for whichfnreturnstruegiven the entity and itsCinstance.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited