Skip to content

Commit 2a00ec6

Browse files
committed
Convert class fields
1 parent d35e950 commit 2a00ec6

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

src/DebugGameScalePlugin.js

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ const { POST_RENDER } = Phaser.Core.Events
55
const { ENTER_FULLSCREEN, FULLSCREEN_FAILED, FULLSCREEN_UNSUPPORTED, LEAVE_FULLSCREEN, ORIENTATION_CHANGE, RESIZE } = Phaser.Scale.Events
66

77
export default class DebugGameScalePlugin extends Phaser.Plugins.BasePlugin {
8-
x = null;
9-
y = null;
10-
width = 512;
11-
height = 128;
12-
font = '12px system-ui, sans-serif';
13-
lineHeight = 16;
14-
color = 'white';
15-
shadowBlur = 0
16-
shadowOffsetX = 1
17-
shadowOffsetY = 1
18-
shadowColor = 'black'
19-
8+
constructor(pluginManager) {
9+
super(pluginManager);
10+
11+
this.x = null;
12+
this.y = null;
13+
this.width = 512;
14+
this.height = 128;
15+
this.font = '12px system-ui, sans-serif';
16+
this.lineHeight = 16;
17+
this.color = 'white';
18+
this.shadowBlur = 0;
19+
this.shadowOffsetX = 1;
20+
this.shadowOffsetY = 1;
21+
this.shadowColor = 'black';
22+
}
2023

2124
init (data) {
2225
if (!this.game.renderer.gameCanvas) {

0 commit comments

Comments
 (0)