EventWriter<T> class

Write access to events of type T.

Used in systems to send events that will be readable next frame.

@system
void detectCollisions(EventWriter<CollisionEvent> writer) {
  // When collision detected:
  writer.send(CollisionEvent(entityA, entityB));
}

Constructors

EventWriter(EventQueue<T> _queue)
Creates an event writer.

Properties

hashCode int
The hash code for this object.
no setterinherited
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
send(T event) → void
Sends an event to be read next frame.
sendBatch(Iterable<T> events) → void
Sends multiple events to be read next frame.
toString() String
A string representation of this object.
inherited

Operators

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