Skip to content

Commit cc39742

Browse files
committed
Update main.js
1 parent 5f8a5a5 commit cc39742

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

src/game/main.js

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
import { Boot } from './scenes/Boot';
2-
import { Game } from './scenes/Game';
3-
import { GameOver } from './scenes/GameOver';
4-
import { MainMenu } from './scenes/MainMenu';
5-
import Phaser from 'phaser';
6-
import { Preloader } from './scenes/Preloader';
7-
8-
// Find out more information about the Game Config at:
9-
// https://newdocs.phaser.io/docs/3.70.0/Phaser.Types.Core.GameConfig
10-
const config = {
11-
type: Phaser.AUTO,
12-
width: 1024,
13-
height: 768,
14-
parent: 'game-container',
15-
backgroundColor: '#028af8',
16-
scene: [
17-
Boot,
18-
Preloader,
19-
MainMenu,
20-
Game,
21-
GameOver
22-
]
23-
};
24-
25-
const StartGame = (parent) => {
26-
27-
return new Phaser.Game({ ...config, parent });
28-
29-
}
30-
31-
export default StartGame;
1+
import { Boot } from './scenes/Boot';
2+
import { Game } from './scenes/Game';
3+
import { GameOver } from './scenes/GameOver';
4+
import { MainMenu } from './scenes/MainMenu';
5+
import Phaser from 'phaser';
6+
import { Preloader } from './scenes/Preloader';
7+
8+
// Find out more information about the Game Config at:
9+
// https://docs.phaser.io/api-documentation/typedef/types-core#gameconfig
10+
const config = {
11+
type: Phaser.AUTO,
12+
width: 1024,
13+
height: 768,
14+
parent: 'game-container',
15+
backgroundColor: '#028af8',
16+
scene: [
17+
Boot,
18+
Preloader,
19+
MainMenu,
20+
Game,
21+
GameOver
22+
]
23+
};
24+
25+
const StartGame = (parent) => {
26+
27+
return new Phaser.Game({ ...config, parent });
28+
29+
}
30+
31+
export default StartGame;

0 commit comments

Comments
 (0)