Available since

4.6.0

.

Constructor

@:value({ GamepadID : FlxInputDeviceID.FIRST_ACTIVE, Axis : EITHER })new(InputID:FlxGamepadInputID, Trigger:FlxAnalogState, Axis:FlxAnalogAxis = EITHER, GamepadID:Int = FlxInputDeviceID.FIRST_ACTIVE)

Gamepad action input for analog (trigger, joystick, touchpad, etc) events

Parameters:

InputID

"universal" gamepad input ID (LEFT_TRIGGER, RIGHT_ANALOG_STICK, TILT_PITCH, etc)

Trigger

What state triggers this action (MOVED, JUST_MOVED, STOPPED, JUST_STOPPED)

Axis

which axes to monitor for triggering: X, Y, EITHER, or BOTH

GamepadID

specific gamepad ID, or FlxInputDeviceID.FIRST_ACTIVE / ALL

Methods

Inherited Variables

Defined by FlxActionInputAnalog

@:value(0)read onlyx:Float = 0

read onlyxMoved:FlxInput<Int>

@:value(0)read onlyy:Float = 0

read onlyyMoved:FlxInput<Int>

Defined by FlxActionInput

@:value(false)read onlydestroyed:Bool = false

device:FlxInputDevice

Mouse, Keyboard, Gamepad, SteamController, etc.

deviceID:Int

Gamepad ID or Steam Controller handle (ignored for Mouse & Keyboard)

read onlyinputID:Int

Input code (FlxMouseButtonID, FlxKey, FlxGamepadInputID, or Steam Controller action handle)

read onlytrigger:FlxInputState

What state triggers this action (PRESSED, JUST_PRESSED, RELEASED, JUST_RELEASED)

type:FlxInputType

Digital or Analog

Inherited Methods