Added<T> class

Filter for entities where component T was added recently.

Use this filter to query only entities that had the component added since the last time this query ran.

// Query for entities with newly added Health component
final query = world.query1<Health>(filter: Added<Health>());
for (final (entity, health) in query.iter()) {
  // Initialize health bar UI
}
Inheritance

Constructors

Added()
Creates a filter for recently added components of type T.
const

Properties

componentId ComponentId
The component ID being filtered.
no setter
excluded Set<ComponentId>
Gets the component IDs that must be absent.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
required Set<ComponentId>
Gets the component IDs that must be present.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited