Skip to main content

GamepadButtonEvent

Gamepad button event. See Gamepads for information on responding to controller input. Gamepad instances receive this event;

Hierarchy

Index

Constructors

constructor

  • Parameters

    • button: Buttons

      The Gamepad Buttons if not known by excalibur Buttons.Unknown is returned, use index to disambiguate.

    • index: number

      The canonical index of the gamepad button from the system

    • value: number

      A numeric value between 0 and 1

    • self: Gamepad

      Reference to the gamepad

    Returns GamepadButtonEvent

Properties

publicbutton

button: Buttons

The Gamepad Buttons if not known by excalibur Buttons.Unknown is returned, use index to disambiguate.

publicindex

index: number

The canonical index of the gamepad button from the system

publicinheritedother

other: Gamepad | null = null

Other target object for this event

publicself

self: Gamepad

Reference to the gamepad

publicinheritedtarget

target: Gamepad

Target object for this event.

publicvalue

value: number

A numeric value between 0 and 1

Accessors

publicinheritedbubbles

  • get bubbles(): boolean
  • set bubbles(value: boolean): void
  • If set to false, prevents event from propagating to other actors. If true it will be propagated to all actors that apply.


    Returns boolean

  • Parameters

    • value: boolean

    Returns void

Methods

publicinheritedstopPropagation

  • stopPropagation(): void
  • Prevents event from bubbling


    Returns void