mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed remote joint
This commit is contained in:
parent
0665348ae2
commit
b159bbb1cc
12 changed files with 143 additions and 29 deletions
|
|
@ -93,6 +93,21 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
this.gameObjects.animated.push(player.getDoll());
|
||||
}
|
||||
|
||||
GameController.prototype.onHandActionResponse = function(options) {
|
||||
var player = this.players[options.playerId];
|
||||
|
||||
var item = null;
|
||||
for (var i = 0; i < this.gameObjects.animated.length; i++) {
|
||||
var currentItem = this.gameObjects.animated[i];
|
||||
if(currentItem.uid == options.itemUid) {
|
||||
item = currentItem;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
player.handAction(options.x, options.y, options.isHolding, item);
|
||||
};
|
||||
|
||||
GameController.prototype.loadLevel = function (path) {
|
||||
Parent.prototype.loadLevel.call(this, path);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue