mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
added joints
This commit is contained in:
parent
fa110ff4a8
commit
764220675b
10 changed files with 111 additions and 24 deletions
|
|
@ -14,7 +14,8 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
this.keyboardInput = new KeyboardInput(this);
|
||||
this.xyInput = new MouseInput(this);
|
||||
|
||||
NotificationCenter.on("onXyChange", this.setXY, this);
|
||||
NotificationCenter.on("input/onXyChange", this.setXY, this);
|
||||
NotificationCenter.on("input/onHandAction", this.handAction, this);
|
||||
|
||||
var keys = {
|
||||
w:87,
|
||||
|
|
@ -71,6 +72,12 @@ function (Parent, KeyboardInput, MouseInput, NotificationCenter) {
|
|||
NotificationCenter.trigger('sendGameCommand', 'lookAt', options);
|
||||
};
|
||||
|
||||
PlayerController.prototype.handAction = function(x, y) {
|
||||
var options = {x:x, y:y};
|
||||
Parent.prototype.handAction.call(this, options);
|
||||
NotificationCenter.trigger("sendGameCommand", "handAction", options);
|
||||
};
|
||||
|
||||
PlayerController.prototype.update = function () {
|
||||
this.keyboardInput.update();
|
||||
Parent.prototype.update.call(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue