Commands class final

Queues structural world changes.

Constructors

Commands(World _world)

Properties

hashCode → int
The hash code for this object.
no setterinherited
isApplying → bool
Whether apply is running.
no setter
isEmpty → bool
Whether there are no pending commands.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply() → void
Applies and clears all pending commands. Must not be called while a query is iterating. A call made while applying returns at once; the running apply drains everything queued in the meantime.
defer(Entity entity, void command(World world, Entity entity)) → void
Queues command in the same FIFO as inserts, removals and despawns.
despawn(Entity entity) → void
Queues despawning entity.
entity(Entity entity) → EntityCommands
Returns a fluent command handle targeting entity.
insert<T>(Entity entity, T component) → void
Queues inserting component of type T onto entity.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove<T>(Entity entity) → void
Queues removing the component of type T from entity.
removeByType(Type componentType, Entity entity) → void
Queues removal using a runtime componentType.
spawn([SceneDashBundle? bundle]) → EntityCommands
Reserves an entity and queues bundle.
toString() → String
A string representation of this object.
inherited

Operators

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