Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/phaser-navmesh/src/phaser-navmesh-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class PhaserNavMeshPlugin extends Phaser.Plugins.ScenePlugin {

/** Phaser.Scene lifecycle event */
public boot() {
const emitter = this.systems.events;
const emitter = this.systems!.events;
emitter.once("destroy", this.destroy, this);
}

Expand All @@ -35,7 +35,7 @@ export default class PhaserNavMeshPlugin extends Phaser.Plugins.ScenePlugin {

/** Phaser.Scene lifecycle event - will destroy all navmeshes created. */
public destroy() {
this.systems.events.off("boot", this.boot, this);
this.systems!.events.off("boot", this.boot, this);
this.removeAllMeshes();
}

Expand Down Expand Up @@ -162,7 +162,7 @@ export default class PhaserNavMeshPlugin extends Phaser.Plugins.ScenePlugin {
);
}

const mesh = new PhaserNavMesh(this, this.scene, key, polygons, 0);
const mesh = new PhaserNavMesh(this, this.scene!, key, polygons, 0);
this.phaserNavMeshes[key] = mesh;

return mesh;
Expand Down Expand Up @@ -212,7 +212,7 @@ export default class PhaserNavMeshPlugin extends Phaser.Plugins.ScenePlugin {
];
});

const mesh = new PhaserNavMesh(this, this.scene, key, polygons, meshShrinkAmount);
const mesh = new PhaserNavMesh(this, this.scene!, key, polygons, meshShrinkAmount);

this.phaserNavMeshes[key] = mesh;

Expand Down