Listener

Guide: Listeners

Exposes a way to match against certain combinations of source/target/event entities present on a fired event.

Handlers can be defined inside by annotating a function with Handler, these are the actual functions that run when a matching event is found.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Gets a component, ensuring it is on the entity.

Link copied to clipboard

Gets a component or provides a default if the entity doesn't have it.

Link copied to clipboard

Gets a component or null if the entity doesn't have it.

Link copied to clipboard

Queries for a specific relation or by kind/target.

Link copied to clipboard
operator fun <T> Accessor<T>.getValue(thisRef: EventScope, property: KProperty<*>): T
operator fun <T> Accessor<T>.getValue(thisRef: SourceScope, property: KProperty<*>): T
operator fun <T> Accessor<T>.getValue(thisRef: TargetScope, property: KProperty<*>): T
Link copied to clipboard
inline fun <T : Component> onAdd(): Family

Fires when an entity has a component of type T added, updates are not considered since no data changes.

Link copied to clipboard

Fires when an entity has a component of type T set, only if it was not set before.

Link copied to clipboard

Fires when an entity has a component of type T set or updated.

Link copied to clipboard
open fun onStart()
Link copied to clipboard
fun start()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard