mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixes #32
This commit is contained in:
parent
2c5bb1bb39
commit
1e748a93cb
5 changed files with 6 additions and 42 deletions
|
|
@ -26,7 +26,9 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
up: 38,
|
||||
left: 37,
|
||||
down: 40,
|
||||
right: 39
|
||||
right: 39,
|
||||
|
||||
space: 32
|
||||
}
|
||||
|
||||
this.init(keys);
|
||||
|
|
@ -44,6 +46,7 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
|
||||
this.keyboardInput.registerKey(keys.w, 'jump');
|
||||
this.keyboardInput.registerKey(keys.up, 'jump');
|
||||
this.keyboardInput.registerKey(keys.space, 'jump');
|
||||
}
|
||||
|
||||
PlayerController.prototype.moveLeft = function () {
|
||||
|
|
@ -77,13 +80,7 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
Parent.prototype.handAction.call(this, options);
|
||||
NotificationCenter.trigger("sendGameCommand", "handAction", options);
|
||||
};
|
||||
|
||||
PlayerController.prototype.update = function () {
|
||||
this.keyboardInput.update();
|
||||
Parent.prototype.update.call(this);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return PlayerController;
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue