mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixed #38
This commit is contained in:
parent
7a59e175e0
commit
89c5e4a5d8
6 changed files with 64 additions and 25 deletions
|
|
@ -73,6 +73,7 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
} while (body = body.GetNext());
|
||||
|
||||
}
|
||||
|
|
@ -91,6 +92,14 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
var player = this.players[playerId];
|
||||
player.spawn(x, y);
|
||||
this.gameObjects.animated.push(player.getDoll());
|
||||
|
||||
if(options.holdingItemUid) {
|
||||
this.onHandActionResponse({
|
||||
itemUid: options.holdingItemUid,
|
||||
action: "grab",
|
||||
playerId: playerId
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
GameController.prototype.onHandActionResponse = function(options) {
|
||||
|
|
@ -112,7 +121,7 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
player.grab(item);
|
||||
}
|
||||
} else {
|
||||
console.warn("Item for joint can not be found locally.")
|
||||
console.warn("Item for joint can not be found locally. " + options.itemUid)
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue