API Docs for: v0.1.0
Show:

InputManager Class

Extends Object

Manages all input handlers in a unified way

Constructor

InputManager

(
  • game
)

Parameters:

  • game Game

    The game instance this input belongs to

Item Index

Methods

Methods

update

(
  • dt
)
private

Called internally every frame. Updates all the pointers and gamepad

Parameters:

  • dt Number

    The delta time (in seconds) since the last update

Properties

canvas

Game

The dom element to bind events to

game

Game

The game instance this manager belongs to

gamepad

Keyboard

Holds the gamepad handler for gamepad events

keyboard

Keyboard

Holds the keyboard handler for keyboard events

pointer

Pointer

Holds the pointer handler for pointer events