API Docs for: 0.0.2
Show:

Atlantis.KeyboardComponent Class

Module: Engine
Parent Module: Atlantis

A keyboard component that be used with KeyboardHelper to provide some interesting keyboars states as pressed, justPressed, etc.

Constructor

Atlantis.KeyboardComponent

(
  • game
)

Parameters:

Methods

@setEnabled

(
  • enabled
)

Gets the status of the component.

Parameters:

  • enabled Boolean

    Sets to true to enable

control

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

down

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

enter

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

escape

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

initialize

()

Initialize the logic of the component.

isEnabled

() Boolean

Gets the status of the component.

Returns:

Boolean:

The status of the component.

isInitialized

() Boolean

Flags used to determine if the initialization processes is done.

Returns:

justPressed

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

justReleased

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

left

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

pressed

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

released

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

right

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

shift

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

space

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

tab

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

up

(
  • key
)
Boolean

Parameters:

Returns:

Boolean:

Return true if pressed, otherwise return false.

update

(
  • gameTime
)

Update key states.

Parameters: