forked from PhaserEditor2D/starter-template-basic-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLevel.js
More file actions
executable file
·51 lines (33 loc) · 903 Bytes
/
Copy pathLevel.js
File metadata and controls
executable file
·51 lines (33 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// You can write more code here
/* START OF COMPILED CODE */
class Level extends Phaser.Scene {
constructor() {
super("Level");
/* START-USER-CTR-CODE */
// Write your code here.
/* END-USER-CTR-CODE */
}
/** @returns {void} */
editorCreate() {
// dino
const dino = this.add.image(640, 288, "dino");
// onPointerDownScript
const onPointerDownScript = new OnPointerDownScript(dino);
// pushActionScript
new PushActionScript(onPointerDownScript);
// text_1
const text_1 = this.add.text(640, 478, "", {});
text_1.setOrigin(0.5, 0.5);
text_1.text = "Phaser 3 + Phaser Editor 2D";
text_1.setStyle({ "fontFamily": "Arial", "fontSize": "30px" });
this.events.emit("scene-awake");
}
/* START-USER-CODE */
// Write more your code here
create() {
this.editorCreate();
}
/* END-USER-CODE */
}
/* END OF COMPILED CODE */
// You can write more code here