-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
44 lines (41 loc) · 923 Bytes
/
index.js
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
/* global Phaser */
import Boot from './src/scenes/Boot.js'
import Credits from './src/scenes/Credits.js'
import GameScene from './src/scenes/Game.js'
import GameComplete from './src/scenes/GameComplete.js'
import GameOver from './src/scenes/GameOver.js'
import Options from './src/scenes/Options.js'
import Preloader from './src/scenes/Preloader.js'
import Title from './src/scenes/Title.js'
import UserInterface from './src/scenes/UIScene.js'
const scenes = [
Boot,
Credits,
GameScene,
GameComplete,
GameOver,
Options,
Preloader,
Title,
UserInterface
]
const Game = new Phaser.Game({
type: Phaser.AUTO,
width: 1600,
height: 900,
scene: scenes,
backgroundColor: '#000000',
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH
},
input: {
keyboard: true
},
pixelArt: true,
parent: 'game',
dom: {
createContainer: true
}
})
export default Game