From 69f52d96fcd6be0f65d01f7769cdcc9fb16f3762 Mon Sep 17 00:00:00 2001 From: logsol Date: Sat, 21 Jul 2012 21:59:45 +0200 Subject: [PATCH] altered define paths --- app/Game/Client/Control/KeyboardController.js | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/app/Game/Client/Control/KeyboardController.js b/app/Game/Client/Control/KeyboardController.js index 86d7c99..3356d6d 100755 --- a/app/Game/Client/Control/KeyboardController.js +++ b/app/Game/Client/Control/KeyboardController.js @@ -1,8 +1,8 @@ -define(["Chuck/Control/InputController", "Chuck/Control/KeyboardInput"], function(InputController, KeyboardInput){ +define(["Game/Core/Control/InputController", "Game/Client/Control/KeyboardInput"], function(InputController, KeyboardInput){ - function InputControlUnit(me, clientProcessor) { + function KeyboardController(me, gameController) { - this.clientProcessor = clientProcessor; + this.gameController = gameController; this.inputController = new InputController(me); this.keyboardInput = new KeyboardInput(this); @@ -22,7 +22,7 @@ define(["Chuck/Control/InputController", "Chuck/Control/KeyboardInput"], functio this.init(keys); } - InputControlUnit.prototype.init = function(keys) { + KeyboardController.prototype.init = function(keys) { this.keyboardInput.registerKey(keys.a, 'moveLeft', 'stop', 'moveLeft'); this.keyboardInput.registerKey(keys.left, 'moveLeft', 'stop', 'moveLeft'); @@ -40,55 +40,55 @@ define(["Chuck/Control/InputController", "Chuck/Control/KeyboardInput"], functio this.keyboardInput.registerKey(keys.down, 'activateShift', 'activateShift', 'deactivateShift'); } - InputControlUnit.prototype.moveLeft = function() { + KeyboardController.prototype.moveLeft = function() { this.inputController.moveLeft(); - this.clientProcessor.sendGameCommand('moveLeft'); + this.gameController.sendGameCommand('moveLeft'); } - InputControlUnit.prototype.moveRight = function() { + KeyboardController.prototype.moveRight = function() { this.inputController.moveRight(); - this.clientProcessor.sendGameCommand('moveRight'); + this.gameController.sendGameCommand('moveRight'); } - InputControlUnit.prototype.stop = function() { + KeyboardController.prototype.stop = function() { this.inputController.stop(); - this.clientProcessor.sendGameCommand('stop'); + this.gameController.sendGameCommand('stop'); } - InputControlUnit.prototype.jump = function() { + KeyboardController.prototype.jump = function() { this.inputController.jump(); - this.clientProcessor.sendGameCommand('jump'); + this.gameController.sendGameCommand('jump'); } - InputControlUnit.prototype.jumped = function() { + KeyboardController.prototype.jumped = function() { this.inputController.jumped(); } - InputControlUnit.prototype.jumping = function() { + KeyboardController.prototype.jumping = function() { this.inputController.jumping(); } - InputControlUnit.prototype.duck = function() { + KeyboardController.prototype.duck = function() { this.inputController.duck(); - this.clientProcessor.sendGameCommand('duck'); + this.gameController.sendGameCommand('duck'); } - InputControlUnit.prototype.standUp = function() { + KeyboardController.prototype.standUp = function() { this.inputController.standUp(); } - InputControlUnit.prototype.activateShift = function() { + KeyboardController.prototype.activateShift = function() { this.inputController.activateShift(); - this.clientProcessor.sendGameCommand('activateShift'); + this.gameController.sendGameCommand('activateShift'); } - InputControlUnit.prototype.deactivateShift = function() { + KeyboardController.prototype.deactivateShift = function() { this.inputController.deactivateShift(); } - InputControlUnit.prototype.update = function() { + KeyboardController.prototype.update = function() { this.keyboardInput.update(); } - return InputControlUnit; + return KeyboardController; }); \ No newline at end of file