Improve edit screen

This commit is contained in:
asraelite 2018-03-05 22:29:35 +00:00
parent 52770d7eb2
commit 826986cdbf
12 changed files with 235 additions and 40 deletions

View file

@ -56,6 +56,10 @@ export default class Ship extends Body {
this.landed ? events.landShip() : events.launchShip();
}
clearModules() {
this.modules.clear();
}
addModule(x, y, properties, options) {
let module = new Module(x, y, this, {...properties, ...options});
this.modules.add(module);
@ -128,7 +132,7 @@ export default class Ship extends Body {
this.modules.forEach(m => {
if (m.type !== 'thruster') return;
m.power = forward;
m.power += forward;
});
}