InputClass

Integration with Unity's Input (see Unity: Input)

Constructor

new InputClass()

Methods

onKeyDown(key, fn) → {void}

Binds a function to key down

Parameters:
NameTypeDescription
keystring

The name of the key to bind

fnfunction

The function to call

Returns:
Type: 
void

onKeyUp(key, fn) → {void}

Binds a function to key up

Parameters:
NameTypeDescription
keystring

The name of the key to bind

fnfunction

The function to call

Returns:
Type: 
void