add lasers

This commit is contained in:
Asraelite 2016-03-30 19:15:06 +01:00
parent cf4e8024af
commit f87aa1446d
31 changed files with 298 additions and 125 deletions

View file

@ -6,13 +6,13 @@ const Grapple = require('./grapple.js');
const traits = require('../../traits/fixtures.json');
class Mount {
constructor(ship, data, fixture) {
//this.ship = ship;
constructor(body, data, fixture) {
this.body = body;
this.type = data.type || 'turret';
this.size = data.size || 0;
this.hidden = data.hidden || 'false';
this.position = {
this.pos = {
x: data.pos[0],
y: data.pos[1]
}
@ -63,8 +63,8 @@ class Mount {
packFull() {
return {
x: this.position.x,
y: this.position.y,
x: this.pos.x,
y: this.pos.y,
hidden: this.hidden,
fixture: this.fixture ? this.fixture.id : 0
};