add boilerplate for mounts and fixtures
This commit is contained in:
parent
0ea163dfb7
commit
0a90b6b77a
15 changed files with 158 additions and 17 deletions
24
server/game/room/world/body/turret/mount.js
Normal file
24
server/game/room/world/body/turret/mount.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
'use strict';
|
||||
|
||||
const Blaster = require('./blaster.js');
|
||||
|
||||
class Mount {
|
||||
constructor(ship, data, fixture) {
|
||||
this.ship = ship;
|
||||
|
||||
this.type = data.type || 'turret';
|
||||
this.fixture = false; // TODO: Create fixture.
|
||||
|
||||
this.traversal = data.traversal ? {
|
||||
cw: data.bounds[0],
|
||||
ccw: data.bounds[1]
|
||||
} : false;
|
||||
}
|
||||
|
||||
destruct() {
|
||||
if (!this.fixture) return;
|
||||
this.fixture.destruct();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Mount;
|
Loading…
Add table
Add a link
Reference in a new issue