fixed remote joint

This commit is contained in:
Jeena 2014-01-20 16:22:31 +01:00
parent 0665348ae2
commit b159bbb1cc
12 changed files with 143 additions and 29 deletions

View file

@ -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);
}