add fixture autofire
This commit is contained in:
parent
d9e8e217c6
commit
8e0c4b02e4
9 changed files with 40 additions and 8 deletions
|
@ -38,6 +38,11 @@ class Mount {
|
|||
this.fixture.fire();
|
||||
}
|
||||
|
||||
rest() {
|
||||
if (!this.fixture) return;
|
||||
this.fixture.rest();
|
||||
}
|
||||
|
||||
setFixture(fixture) {
|
||||
if (!(fixture in traits)) return;
|
||||
|
||||
|
@ -53,6 +58,10 @@ class Mount {
|
|||
this.fixture = new fixtureClass(this, data);
|
||||
}
|
||||
|
||||
tick() {
|
||||
this.fixture.tick();
|
||||
}
|
||||
|
||||
packDelta() {
|
||||
return [this.angle || 0, this.fixture.state || 0];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue