clean client code
This commit is contained in:
parent
f3619ba891
commit
21a30ad212
18 changed files with 294 additions and 268 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue