mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 18:47:35 +00:00
removed collisionDetector for every player again, because box2d can only have one - userData solution instead
This commit is contained in:
parent
f07505bc20
commit
a59a258ad6
5 changed files with 21 additions and 18 deletions
|
|
@ -13,6 +13,8 @@ function (Parent, PhysicsEngine, Settings, InputController, requestAnimFrame, No
|
|||
function GameController (channel) {
|
||||
Parent.call(this, new PhysicsEngine());
|
||||
|
||||
this.physicsEngine.setCollisionDetector();
|
||||
|
||||
this.channel = channel;
|
||||
|
||||
this.update();
|
||||
|
|
@ -61,8 +63,6 @@ function (Parent, PhysicsEngine, Settings, InputController, requestAnimFrame, No
|
|||
GameController.prototype.createPlayer = function(user) {
|
||||
var player = new Player(user.id, this.physicsEngine);
|
||||
player.setInputController(new InputController(player))
|
||||
|
||||
this.physicsEngine.setCollisionDetector(player);
|
||||
|
||||
return player;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue