add start of grappling hook

This commit is contained in:
Asraelite 2016-03-26 20:23:05 +00:00
parent ff0ac094cf
commit 4753f879e5
14 changed files with 192 additions and 69 deletions

View file

@ -3,19 +3,17 @@
const Copula = require('./copula.js');
class Rope extends Copula {
constructor(b1, b2) {
super(b1, b2);
constructor(b1, b2, p1, p2) {
super(b1, b2, p1, p2);
this.type = 'rope';
this._length = 0;
}
get length() {
return this._length;
return this.b2joint.GetMaxLength();
}
set length(len) {
this.length = len;
this.b2joint.SetLength(len);
this.b2joint.SetMaxLength(len);
}
}