add setname client command
This commit is contained in:
parent
52e1673e3e
commit
1af386d9f5
10 changed files with 50 additions and 11 deletions
|
@ -3,8 +3,8 @@
|
|||
const traits = require('../../traits/turrets.json');
|
||||
|
||||
class Fixture {
|
||||
constructor(hardpoint, data) {
|
||||
this.hardpoint = hardpoint;
|
||||
constructor(mount, data) {
|
||||
this.mount = mount;
|
||||
|
||||
this.projectiles = new WeakSet();
|
||||
|
||||
|
@ -12,7 +12,8 @@ class Fixture {
|
|||
|
||||
this.rof = turretTraits.rateOfFire;
|
||||
|
||||
this.traversal = this.hardpoint.traversal || false;
|
||||
this.traversal = this.mount.traversal || false;
|
||||
this.fired = false;
|
||||
this._angle = this.traversal ? this.traversal.cw : 0;
|
||||
}
|
||||
|
||||
|
@ -20,6 +21,17 @@ class Fixture {
|
|||
this.projectiles.forEach(p => p.world.removeBody(p));
|
||||
}
|
||||
|
||||
packFull() {
|
||||
return {
|
||||
|
||||
traversal: this.traversal
|
||||
}
|
||||
}
|
||||
|
||||
packDelta() {
|
||||
return [this.traversal];
|
||||
}
|
||||
|
||||
get angle() {
|
||||
return this._angle;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue