You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Delegates on listeners allow for single self-destroyable listeners to exist.
The following code will return the closest entity to the player once the back input key is pressed.
val closestEntity by receiveNext<MovementEvent.InputUpdate, Entity>(
transform = { getClosestEntity<Entity>(player.eyePos, 7.0) },
) { it.input.pressingBack }
It also allows to listen incoming events in an unorthodox way.
There are no practical uses outside of unsynchronized multi-threading where value loss is acceptable.
Feature
Delegates on listeners allow for single self-destroyable listeners to exist.
The following code will return the closest entity to the player once the back input key is pressed.
It also allows to listen incoming events in an unorthodox way.
There are no practical uses outside of unsynchronized multi-threading where value loss is acceptable.
Additional Information
No response
Pull Request
Code of Conduct