fix: delegation
This commit is contained in:
parent
229028821c
commit
4233b96be2
|
@ -12,11 +12,6 @@ export default (Tiles) => class PhysicsTiles extends Tiles {
|
||||||
|
|
||||||
$$world;
|
$$world;
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
this.on('update', this.onTilesUpdate, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
addBodies() {
|
addBodies() {
|
||||||
if (!this.$$world) {
|
if (!this.$$world) {
|
||||||
return;
|
return;
|
||||||
|
@ -41,7 +36,8 @@ export default (Tiles) => class PhysicsTiles extends Tiles {
|
||||||
this.$$impassable = new Set(impassable);
|
this.$$impassable = new Set(impassable);
|
||||||
}
|
}
|
||||||
|
|
||||||
onTilesUpdate() {
|
onTilesUpdate(rectangle) {
|
||||||
|
super.onTilesUpdate(rectangle);
|
||||||
this.removeBodies();
|
this.removeBodies();
|
||||||
this.addBodies();
|
this.addBodies();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user