Code: Select all
Input.define('turnLeft', {'key', 'a'})
EDIT: I found something that WORKS, but is most likely not what I should be doing:
Code: Select all
Input.define('turnLeft', {'a', 'a'})
I think this is how the code is intended to be used, but there has to be a shorter way?
Code: Select all
keyMap = {}
keyMap['key'] = 'a'
Input.define('turnLeft', keyMap)
keyMap = {}
keyMap['key'] = 'd'
Input.define('turnRight', keyMap)
Code: Select all
Input.define('turnLeft', {['key']='a'})
Input.define('turnRight', {['key']='d'})