Sets the position on another effect context when a specific event is dispatched. The position is calculated by a custom callback.

Available since

1.0.0

.

Constructor

new(context:IEffectContext, dispatcher:IEventDispatcher, eventType:String, callback:Event ‑> Float)

Creates a new EventToPositionEffectContext object from the given arguments.

Available since

1.0.0

.

Variables

dispatcher:IEventDispatcher

The object that dispatches eventType.

Available since

1.0.0

.

eventType:String

Listens for this event on from the dispatcher.

Available since

1.0.0

.

callback:Event ‑> Float

The function called when the event is dispatched. Returns a new value for the effect context's position property (in the range from 0.0 to 1.0).

Available since

1.0.0

.

Methods

Inherited Variables

Defined by BaseDelegateEffectContext

read onlycontext:IEffectContext

The effect context that is the target of this delegate.

Available since

1.0.0

.

Inherited Methods