add start of box2d physics
This commit is contained in:
parent
bb9a493450
commit
95e0f6b710
25 changed files with 97 additions and 6 deletions
|
@ -1,12 +1,17 @@
|
|||
'use strict';
|
||||
|
||||
const defaults = require('./traits/defaults.json');
|
||||
const hulls = require('./traits/hulls.json');
|
||||
|
||||
const Body = require('./body.js');
|
||||
|
||||
class Ship extends Body {
|
||||
constructor(player) {
|
||||
constructor(player, build) {
|
||||
super();
|
||||
|
||||
|
||||
this.build = build || defaults.spawnShip.build;
|
||||
this.player = player;
|
||||
this.structure = hulls[this.build.hull];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue