API Docs for:
Show:

File: keyboard-input\Components.js

/**
 A component class that holds key bindings for a given entity that translate key codes into actions.
 @class KeyboardInput
 @constructor
 @param keyBindings {Object} An object containing the key bindings.
 */
function KeyboardInput(keyBindings){
    this._keyBindings = keyBindings || null;
}

KeyboardInput.prototype = {
    constructor : KeyboardInput,
    _componentIdentifier : 0,
    
    /**
     @method getKeyBindings
     @return {Object} Direct reference to the object containing the key bindings.
     */
    getKeyBindings : function(){
        return this._keyBindings;
    },
    
    /**
     @method setKeyBindings
     @param keyBindings {Object} An object containing the key bindings.
     */
    setKeyBindings : function(keyBindings){
        this._keyBindings = keyBindings;
    }
};