fix projectiles
This commit is contained in:
parent
0906441246
commit
4f42723f4a
7 changed files with 20 additions and 8 deletions
|
@ -75,6 +75,7 @@ class World {
|
|||
this.bodies.add(body);
|
||||
if (body.type == 'asteroid') this.asteroids.add(body);
|
||||
if (body.type == 'structure') this.structures.add(body);
|
||||
if (body.class == 'projectile') this.projectiles.add(body);
|
||||
this.physics.createBody(body);
|
||||
this.room.broadcast('create', body.packFull());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue