IsTaskProcessable<T extends App<T> , E extends ECSBase<T> > mixin
Adds Task processing capabilities to an ECS object.
Tasks are queued and executed in a controlled pipeline each frame. Listeners can intercept and cancel tasks before they reach onTask or execute.
- Superclass constraints
- Self<
E> - HasAppAccess<
T> - IsEventEmittable<
T, E>
- Self<
- Mixin applications
Properties
- app → T
-
no setterinherited
- backend → UnhingedBackend
-
Shorthand for App.backend.
no setterinherited
-
draw
→ Drawers<
T> -
Shorthand for App.draw.
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
- 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
-
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 → E
-
This object cast to
T.no setterinherited -
time
→ AppTime<
T> -
Shorthand for App.time.
no setterinherited
Methods
-
callback(
void callback()) → void -
inherited
-
clearTaskQueue(
) → void - Clears task queue.
-
dispatch(
Event< T> event, {EventScope scope = .local}) → void -
Dispatches an
eventimmediately and synchronously, bypassing the central event queue.inherited -
emit(
Event< T> event, {EventScope scope = .local}) → void -
Queues an
eventinto the central application event queue for asynchronous processing.inherited -
getAncestors(
) → Iterable< ECSBase< T> > -
Returns every ancestor of this component, from immediate parent up to the root.
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 -
listenOnBeforeEvent(
bool fn(E self, Event< T> event)) → E -
Registers
fnas a before-event listener.inherited -
listenOnEvent(
void fn(E self, Event< T> event)) → E -
Registers
fnto be called for every incoming event.inherited -
listenOnTask(
bool fn(Task< T> task)) → E -
Registers
fnto be called for each task before it is executed. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBeforeEvent(
Event< T> event) → bool -
Override to cancel an event handling from within the class.
inherited
-
onEvent(
Event< T> event) → void -
Override to handle incoming events within the class.
inherited
-
onSelf(
void fn(E self)) → E -
Calls
fnwith self and returns self, for fluent chaining.inherited -
onTask(
Task< T> task) → void - Override to intercept tasks before they execute.
-
run(
Task< T> task) → E -
Enqueues
taskand executes it immediately at the end of the current frame, if it isn't already running.override -
task(
Task< T> task) → void -
Enqueues
taskfor execution starting at the end of the current frame.override -
toString(
) → String -
A string representation of this object.
inherited
-
uniqKey(
String key) → String -
Returns a key namespaced to this object's namedId.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited