public/js-roguelike-skeleton/src/input.js
function(bindings) {
            for (var action in bindings) {
                var keys = bindings[action];
                for (var i = 0; i < keys.length; i++) {
                    var key = keys[i];
                    this.bindAction(action, key);
                }
            }
        }
function(bindings) {
            for (var action in bindings) {
                var keys = bindings[action];
                for (var i = 0; i < keys.length; i++) {
                    var key = keys[i];
                    this.bindAction(action, key);
                }
            }
        }
function ( bindings ) { for ( var action in bindings ) { var keys = bindings [ action ] ; for ( var i = 0 ; i < keys . length ; i ++ ) { var key = keys [ i ] ; this . bindAction ( action , key ) ; } } }
Loads multiple action key bindings
@method addBindings
@param {Object} bindings - An object of key val pairs mapping an action to an array of keys that trigger it. Input.Keys is used to convert input key string names to key codes.
@param bindings.action1 {Array} Input keys mapped to action1. ['A', 'B', ...]
@param bindings.action2 {Array} Input keys mapped to action2. ['X', 'Y', ...]
@param bindings....
@example
bindings param example:
{
up: ['UP_ARROW'],
down: ['DOWN_ARROW'],
left: ['LEFT_ARROW'],
right: ['RIGHT_ARROW'],
}
Loads multiple action key bindings