add start of box2d physics

This commit is contained in:
Asraelite 2016-03-21 20:44:15 +00:00
parent bb9a493450
commit 95e0f6b710
25 changed files with 97 additions and 6 deletions

View file

@ -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];
}
}