Skip to content

Commit 172885e

Browse files
committed
1.0.1
1 parent 3f4b0d6 commit 172885e

File tree

4 files changed

+15
-17
lines changed

4 files changed

+15
-17
lines changed

dist/display-list-watcher.es.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -91,24 +91,23 @@ class DisplayListWatcher extends Phaser.Plugins.ScenePlugin {
9191
this.toggleKey = null;
9292
}
9393
boot() {
94-
const { textures } = this.systems;
94+
const { cache, events, settings, textures } = this.systems;
9595
if (!hasPendingFontImage && !textures.exists(fontTextureKey)) {
9696
hasPendingFontImage = true;
9797
textures.addBase64(fontKey, fontImage);
9898
}
9999
textures.once(`${TextureEvents.ADD_KEY}${fontTextureKey}`, () => {
100-
this.systems.cache.bitmapFont.add(
101-
fontKey,
102-
ParseRetroFont(this.scene, fontData)
103-
);
100+
cache.bitmapFont.add(fontKey, ParseRetroFont(this.scene, fontData));
104101
});
105-
if (this.systems.settings.key === "__SYSTEM") {
102+
if (settings.key === "__SYSTEM") {
106103
return;
107104
}
108-
const events = this.systems.events;
109105
events.on(SceneEvents.START, this.start, this);
110106
events.on(SceneEvents.SHUTDOWN, this.stop, this);
111107
events.on(SceneEvents.DESTROY, this.destroy, this);
108+
if (settings.isBooted) {
109+
this.start();
110+
}
112111
}
113112
startIfFontWasAdded(cache, key) {
114113
if (key !== fontKey) {

dist/display-list-watcher.umd.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -94,24 +94,23 @@
9494
this.toggleKey = null;
9595
}
9696
boot() {
97-
const { textures } = this.systems;
97+
const { cache, events, settings, textures } = this.systems;
9898
if (!hasPendingFontImage && !textures.exists(fontTextureKey)) {
9999
hasPendingFontImage = true;
100100
textures.addBase64(fontKey, fontImage);
101101
}
102102
textures.once(`${TextureEvents.ADD_KEY}${fontTextureKey}`, () => {
103-
this.systems.cache.bitmapFont.add(
104-
fontKey,
105-
ParseRetroFont(this.scene, fontData)
106-
);
103+
cache.bitmapFont.add(fontKey, ParseRetroFont(this.scene, fontData));
107104
});
108-
if (this.systems.settings.key === "__SYSTEM") {
105+
if (settings.key === "__SYSTEM") {
109106
return;
110107
}
111-
const events = this.systems.events;
112108
events.on(SceneEvents.START, this.start, this);
113109
events.on(SceneEvents.SHUTDOWN, this.stop, this);
114110
events.on(SceneEvents.DESTROY, this.destroy, this);
111+
if (settings.isBooted) {
112+
this.start();
113+
}
115114
}
116115
startIfFontWasAdded(cache, key) {
117116
if (key !== fontKey) {

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phaser-plugin-display-list-watcher",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "Shows the scene display lists",
55
"keywords": [
66
"phaser",

0 commit comments

Comments
 (0)