A gamepad.
Static variables
static deadZone : Float
Determines the gamepad's deadZone. Anything under this value will be considered 0 to prevent jitter.
Static functions
static gamepad (id : GamepadID) : Null<Gamepad>
Returns a gamepad object, or null if none exists at this ID.
Parameters:
id | The id of the gamepad, starting with 0 |
Returns:
A Gamepad object
Variables
id : Int
Functions
check (button : GamepadButton) : Bool
If the gamepad button is held down. Omit argument to check for any button.
Parameters:
button | The button index to check. |
defineAxis (input : InputType, axis : GamepadAxis, minValue : Float = 0, maxValue : Float = 1) : Void
getAxis (a : Int) : Float
Returns the axis value (from 0 to 1)
Parameters:
a | The axis index to retrieve starting at 0 |
released (button : GamepadButton) : Bool
If the gamepad button was released this frame. Omit argument to check for any button.
Parameters:
button | The button index to check. |