31 lines
755 B
JavaScript
31 lines
755 B
JavaScript
|
/**
|
||
|
* @param apiControls
|
||
|
* @constructor
|
||
|
*/
|
||
|
R3.API.Controls.Keyboard = function(
|
||
|
apiControls
|
||
|
) {
|
||
|
|
||
|
if (R3.Utils.UndefinedOrNull(apiControls)) {
|
||
|
apiControls = {
|
||
|
controlsType : R3.API.Controls.CONTROLS_TYPE_KEYBOARD
|
||
|
};
|
||
|
}
|
||
|
|
||
|
if (R3.Utils.UndefinedOrNull(apiControls.controlsType)) {
|
||
|
apiControls.controlsType = R3.API.Controls.CONTROLS_TYPE_KEYBOARD;
|
||
|
}
|
||
|
|
||
|
R3.API.Controls.call(
|
||
|
this,
|
||
|
apiControls.id,
|
||
|
apiControls.name,
|
||
|
apiControls.controlsType,
|
||
|
apiControls.canvas,
|
||
|
apiControls.parentEntity
|
||
|
);
|
||
|
};
|
||
|
|
||
|
R3.API.Controls.Keyboard.prototype = Object.create(R3.API.Controls.prototype);
|
||
|
R3.API.Controls.Keyboard.prototype.constructor = R3.API.Controls.Keyboard;
|