Container used to store Listeners

Constructor

new(?members:Array<Listener>)

Variables

Methods

add(a:BodyOrBodies, b:BodyOrBodies, ?options:Null<ListenerOptions>):Listener

Add a new Listener to the collection.

Parameters:

a

The first Body or Array of Bodies to collide against.

b

The second Body or Array of Bodies to collide against.

options

Options to define the Listener's behavior.

Returns:

The new Listener.

clear():Void

Clears the collection of all Listeners.

dispose():Void

Disposes of the collection. Do not use once disposed.

remove(listener:Listener):Listener

Removes a Listener from the Container.

Parameters:

listener

Listener to remove.

Returns:

The removed Listener.