add start of grappling hook
This commit is contained in:
parent
ff0ac094cf
commit
4753f879e5
14 changed files with 192 additions and 69 deletions
|
@ -7,6 +7,10 @@ class Copula {
|
|||
this.pointA = p1 || b1.com;
|
||||
this.pointB = p2 || b2.com;
|
||||
}
|
||||
|
||||
packFull() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Copula;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue