GamePad

object GamePad

The current gamepad state, if one or multiple are connected.

Up to four gamepads can be connected at one time. The index parameter refers to the current index of which gamepad to read from, such as 0 for the first gamepad (Player 1), 1 for the second gamepad (Player 2), 2 for the third gamepad (Player 3), and 3 for the fourth gamepad (Player 4).

Types

Link copied to clipboard
value class Axis

A specific gamepad axis movement.

Link copied to clipboard
value class Button

A specific gamepad button.

Properties

Link copied to clipboard

The last pressed button on any connected gamepad.

Functions

Link copied to clipboard
fun getAxisCount(index: Int = 0): ERROR CLASS: Unresolved name: GetGamepadAxisCount

Gets the axi available to the gamepad.

Link copied to clipboard
fun getAxisMovement(axis: GamePad.Axis, index: Int = 0): ERROR CLASS: Unresolved name: GetGamepadAxisMovement

Gets the axis movement on the specified gamepad.

Link copied to clipboard
fun getName(index: Int = 0): ERROR CLASS: Unresolved name: toKString??

Gets the internal gamepad name.

Link copied to clipboard
fun isAvailable(index: Int = 0): ERROR CLASS: Unresolved name: IsGamepadAvailable

Whether the gamepad is available.

Link copied to clipboard
fun isDown(button: GamePad.Button, index: Int = 0): ERROR CLASS: Unresolved name: IsGamepadButtonDown

Whether the current button is currently in down state, or being pressed.

Link copied to clipboard
fun isPressed(button: GamePad.Button, index: Int = 0): ERROR CLASS: Unresolved name: IsGamepadButtonPressed

Whether the current button was pressed once.

Link copied to clipboard
fun isreleased(button: GamePad.Button, index: Int = 0): ERROR CLASS: Unresolved name: IsGamepadButtonReleased

Whether the current button was released once.

Link copied to clipboard
fun isUp(button: GamePad.Button, index: Int = 0): ERROR CLASS: Unresolved name: IsGamepadButtonUp

Whether the current button is currently in up state, or not being pressed.

Link copied to clipboard
fun vibrate(left: Float, right: Float, time: Float, index: Int = 0): ERROR CLASS: Unresolved name: SetGamepadVibration

Vibrates the controller.