File tree Expand file tree Collapse file tree 4 files changed +39
-30
lines changed
Expand file tree Collapse file tree 4 files changed +39
-30
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "tabWidth": 4,
3+ "useTabs": false,
4+ "singleQuote": true,
5+ "endOfLine": "lf",
6+ "semi": false
7+ }
Original file line number Diff line number Diff line change 1- < html >
2- < head >
3- < title > Phaser3 + Parceljs Template</ title >
4- </ head >
5- < body >
6- < script src ="main.ts "> </ script >
7- </ body >
8- </ html >
1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7+ < title > LOL2D</ title >
8+ </ head >
9+
10+ < body >
11+ < script src ="main.ts "> </ script >
12+ </ body >
13+
14+ </ html >
Original file line number Diff line number Diff line change @@ -3,16 +3,16 @@ import Phaser from 'phaser'
33import HelloWorldScene from './scenes/HelloWorldScene'
44
55const config : Phaser . Types . Core . GameConfig = {
6- type : Phaser . AUTO ,
7- width : 800 ,
8- height : 600 ,
9- physics : {
10- default : 'arcade' ,
11- arcade : {
12- gravity : { y : 200 }
13- }
14- } ,
15- scene : [ HelloWorldScene ]
6+ type : Phaser . AUTO ,
7+ width : 800 ,
8+ height : 600 ,
9+ physics : {
10+ default : 'arcade' ,
11+ arcade : {
12+ gravity : { y : 200 } ,
13+ } ,
14+ } ,
15+ scene : [ HelloWorldScene ] ,
1616}
1717
1818export default new Phaser . Game ( config )
Original file line number Diff line number Diff line change 11import Phaser from 'phaser'
22
3- export default class HelloWorldScene extends Phaser . Scene
4- {
5- constructor ( )
6- {
7- super ( 'hello-world' )
8- }
9-
10- preload ( )
11- {
3+ export default class HelloWorldScene extends Phaser . Scene {
4+ constructor ( ) {
5+ super ( 'hello-world' )
6+ }
7+
8+ preload ( ) {
129 this . load . setBaseURL ( 'http://labs.phaser.io' )
1310
1411 this . load . image ( 'sky' , 'assets/skies/space3.png' )
1512 this . load . image ( 'logo' , 'assets/sprites/phaser3-logo.png' )
1613 this . load . image ( 'red' , 'assets/particles/red.png' )
1714 }
1815
19- create ( )
20- {
16+ create ( ) {
2117 this . add . image ( 400 , 300 , 'sky' )
2218
2319 const particles = this . add . particles ( 'red' )
2420
2521 const emitter = particles . createEmitter ( {
2622 speed : 100 ,
2723 scale : { start : 1 , end : 0 } ,
28- blendMode : 'ADD'
24+ blendMode : 'ADD' ,
2925 } )
3026
3127 const logo = this . physics . add . image ( 400 , 100 , 'logo' )
You can’t perform that action at this time.
0 commit comments