import Phaser from "phaser"; import config from './Config/config'; import BootScene from './Scenes/BootScene'; import PreloaderScene from './Scenes/PreloaderScene'; import TitleScene from './Scenes/TitleScene'; import GameScene from './Scenes/GameScene'; import ResultScene from './Scenes/ResultScene'; import UIScene from './Scenes/UIScene'; import UILoginScene from './Scenes/UILoginScene'; import HighScoreScene from './Scenes/HighScoreScene'; import HelpScene from './Scenes/HelpScene'; import Model from './Model'; class Game extends Phaser.Game { constructor () { super(config); const model = new Model(); this.globals = { model, bgMusic: null }; this.scene.add('Boot', BootScene); this.scene.add('Preloader', PreloaderScene); this.scene.add('Title', TitleScene); this.scene.add('Game', GameScene); this.scene.add('Result', ResultScene); this.scene.add('UI', UIScene); this.scene.add('UILogin', UILoginScene); this.scene.add('HighScore', HighScoreScene); this.scene.add('Help', HelpScene); this.scene.start('Preloader'); } } console.log("initializing Game"); window.game = new Game();