reduce physics cpu usage
This commit is contained in:
parent
8a059b92d5
commit
8ea6c2d937
10 changed files with 2435 additions and 34 deletions
|
@ -8,8 +8,10 @@ class Grapple extends Projectile {
|
|||
super(world, pos);
|
||||
|
||||
this.r = pos.r;
|
||||
this.x = pos.x * 32;
|
||||
this.y = pos.y * 32;
|
||||
this.x = pos.x;
|
||||
this.y = pos.y;
|
||||
this.xvel = pos.xvel;
|
||||
this.yvel = pos.yvel;
|
||||
this.xvel += Math.cos(this.r) * 0.25;
|
||||
this.yvel += Math.sin(this.r) * 0.25;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue