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