-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
30 lines (27 loc) · 1004 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
import Phaser from 'phaser';
import config from './config/config';
import SceneMain from './scenes/gameScene';
import BootScene from './scenes/bootScene';
import PreloaderScene from './scenes/preloaderScene';
import TitleScene from './scenes/titleScene';
import OptionsScene from './scenes/optionsScene';
import CreditsScene from './scenes/creditScene';
import GameOver from './scenes/gameOverScene';
import ScoreScene from './scenes/scoreScene';
// import Entity from './scenes/entities';
class Game extends Phaser.Game {
constructor() {
super(config);
this.scene.add('Boot', BootScene);
this.scene.add('Preloader', PreloaderScene);
this.scene.add('Title', TitleScene);
this.scene.add('Options', OptionsScene);
this.scene.add('Credits', CreditsScene);
this.scene.add('Game', SceneMain);
this.scene.add('End', GameOver);
this.scene.add('Scores', ScoreScene);
// this.scene.add('Entities', Entity);
this.scene.start('Boot');
}
}
window.game = new Game();