API Docs for: 0.0.2
Show:

Atlantis.GamepadState Class

Module: Framework
Parent Module: Atlantis

Define the state of the gamepad at a specified time

Constructor

Atlantis.GamepadState

(
  • axis
  • buttons
)

Parameters:

  • axis Array

    An array of axis values

  • buttons Array

    An array of buttons values (true/false)

Item Index

Methods

getAxis

(
  • (Number|Atlantis.GamepadAxis)
  • Return
)

Gets the value of an axis.

Parameters:

  • (Number|Atlantis.GamepadAxis) Object

    The identifier of the axis

  • Return Number

    the value of the axis between -1 and 1.

isButtonDown

(
  • (Number|Atlantis.GamepadButton)
  • Return
)

Indicate if the button is down.

Parameters:

  • (Number|Atlantis.GamepadButton) Object

    The identifier of the button

  • Return Boolean | Number

    the value of the button.

isButtonUp

(
  • (Number|Atlantis.GamepadButton)
  • Return
)

Indicate if the button is up.

Parameters:

  • (Number|Atlantis.GamepadButton) Object

    The identifier of the button

  • Return Boolean | Number

    the value of the button.