Class: Keyboard

Keyboard()

Keyboard Tracks the current state of user input via specific keyboard keys. Each property represents whether the corresponding key is currently pressed.

Constructor

new Keyboard()

Source:

Members

D :boolean

Whether the 'D' key is pressed (e.g. for throwing).
Type:
  • boolean
Source:

DOWN :boolean

Whether the down arrow key is pressed.
Type:
  • boolean
Source:

LEFT :boolean

Whether the left arrow key is pressed.
Type:
  • boolean
Source:
Whether the right arrow key is pressed.
Type:
  • boolean
Source:

SPACE :boolean

Whether the spacebar is pressed (e.g. for jumping).
Type:
  • boolean
Source:

UP :boolean

Whether the up arrow key is pressed.
Type:
  • boolean
Source: