Adding first version of SuperLoader

This class is the Phaser loader as it should be: it comes with promises,
can be easily run out of the "preload" phase and won't crash if the
scene is destroyed before textures are loaded.
This commit is contained in:
David Négrier
2022-03-18 10:56:20 +01:00
parent ea3088a876
commit c529658ef4
6 changed files with 128 additions and 81 deletions
+4 -2
View File
@@ -92,8 +92,10 @@ export class PositionDispatcher {
public removeViewport(socket: ExSocketInterface): void {
// Also, let's stop listening on viewports
for (const zone of socket.listenedZones) {
this.stopListening(zone, socket);
if (socket.listenedZones) {
for (const zone of socket.listenedZones) {
this.stopListening(zone, socket);
}
}
}