clean client code

This commit is contained in:
Asraelite 2016-03-24 13:26:35 +00:00
parent f3619ba891
commit 21a30ad212
18 changed files with 294 additions and 268 deletions

View file

@ -33,10 +33,10 @@ class Body {
let pos = this.b2body.GetPosition();
let bounds = this.world.bounds;
if(pos.x < bounds.left) this.applyForce(0.003, 0);
if(pos.x > bounds.right) this.applyForce(-0.003, 0);
if(pos.y < bounds.top) this.applyForce(0, 0.003);
if(pos.y > bounds.bottom) this.applyForce(-0, -0.003);
if(pos.x < bounds.left) this.applyForce(0.03, 0);
if(pos.x > bounds.right) this.applyForce(-0.03, 0);
if(pos.y < bounds.top) this.applyForce(0, 0.03);
if(pos.y > bounds.bottom) this.applyForce(-0, -0.03);
}
packDelta() {