Accessed via FlxG.inputs.

Variables

@:value([])read onlylist:Array<IFlxInputManager> = []

A read-only list of all inputs.

@:value(true)resetOnStateSwitch:Bool = true

Whether inputs are reset on state switches. Disable if you need persistent input states across states.

Methods

@:genericinlineadd<T>(input:T):T

Deprecated: "add is deprecated, use addUniqueType"

Add an input to the system

@:genericaddInput<T>(input:T):T

Add an input to the system, unless the same instance was already added

@:genericaddUniqueType<T>(input:T):T

Add an input to the system, unless the same type was already added

@:genericinlineremove<T>(input:T):Bool

Removes an input from the system

Parameters:

Input

The input to remove

Returns:

Bool indicating whether it was removed or not

@:value({ destroyOld : false })@:genericreplace<T>(oldInput:T, newInput:T, destroyOld:Bool = false):Null<T>

Replace an existing input in the system with a new one

Parameters:

oldInput

The old input to replace

newInput

The new input to put in its place

destroyOld

Whether to destroy the old input

Returns:

If successful returns newInput. Otherwise returns null.