Class used for mapping controls to certain actions

Static variables

staticread onlyactionMap:Map<String, Array<Int>>

Map of keycodes to actions

statickeyMapPath:String

Path to the keymap, used for reloading and saving

Static methods

staticbindSingleAction(action:String, keyCodes:Array<Int>):Void

Rebinds an action, will delete any existing binding.

Parameters:

action

the action to bind

keyCodes

the keycodes to use

staticisDown(action:String):Bool

Checks whether any key of an action is pressed.

Parameters:

action

the action to check

Returns:

true if the action is pressed

staticisUp(action:String):Bool

Checks whether any key of an action isn't down.

Parameters:

action

the action to check

Returns:

true if the action is pressed

@:value({ filePath : "./assets/keymap.txt" })staticreadKeyMap(filePath:String = "./assets/keymap.txt"):Void

Reads the keymap from a file

Parameters:

filePath

path to the keymap relative to the exe

staticreloadKeyMap():Void

Reloads the actionmap

staticsaveToKeyMap():Void

Saves the current ActionMap to a file.

staticunbindSingleAction(action:String):Void

Unbinds an action.

Parameters:

action

the action to unbind