mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
refactored grabbing
This commit is contained in:
parent
1c4336c7f7
commit
38b5023410
7 changed files with 124 additions and 62 deletions
|
|
@ -105,7 +105,16 @@ function (Parent, Box2D, PhysicsEngine, ViewManager, PlayerController, Notificat
|
|||
}
|
||||
};
|
||||
|
||||
player.handAction(options.x, options.y, options.isHolding, item);
|
||||
if(item) {
|
||||
if(options.action == "throw") {
|
||||
player.throw(options.x, options.y, item);
|
||||
} else if(options.action == "grab") {
|
||||
player.grab(item);
|
||||
}
|
||||
} else {
|
||||
console.warn("Item for joint can not be found locally.")
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
GameController.prototype.loadLevel = function (path) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue