Class: NullInput

NullInput


new NullInput()

A NullInput is an input device that will never transmit any key as pressed. Even if you don't want any fancy keyboard support or similar, ManualInput is probably a better candidate than NullInput since the later allows you to programmatically trigger key events should you need to, whereas NullInput will never ever do anything.

Implements:
Source:

Methods


getState(port, code)

An engine will call this function to check the current state of a specified input. The function will return true if the input is currently active (pressed), and false otherwise.

Parameters:
Name Type Description
port number

The input controller port.

code number

The input code.

Implements:
Source:

pollInputs()

An engine will call this function to inform the device that it should update the input state.

It means that the devices should never update the input state by themselves, but rather wait for the engine order. It is also important that the update is done synchronously, so that right after returning, the engines are able to call Input#getState.

Implements:
Source: