-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
43 lines (40 loc) · 908 Bytes
/
main.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
import Preloader from './Source/Scenes/preloader.js'
import Credits from './Source/Scenes/credits.js'
import Options from './Source/Scenes/options.js'
import CharacterCreate from './Source/Scenes/characterCreate.js'
import GameOver from './Source/Scenes/gameOver.js'
import GameComplete from './Source/Scenes/gameComplete.js'
import UserInterface from './Source/Scenes/uiScene.js'
const scenes = [
Preloader,
Credits,
Options,
CharacterCreate,
GameOver,
GameComplete,
UserInterface
]
const Game = new Phaser.Game({
type: Phaser.AUTO,
width: 1600,
height: 900,
scene: scenes,
backgroundColor: '#000000',
physics: {
default: 'arcade',
arcade: {
debug: true,
tileBias: 32
}
},
scale: {
mode: Phaser.Scale.FIT,
autoCenter: Phaser.Scale.CENTER_BOTH
},
input: {
keyboard: true,
gamepad: true
},
pixelArt: true
})
export default Game