IPv6Penguin/src/index.js

29 lines
794 B
JavaScript

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 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.start('Preloader');
}
}
console.log("initializing Game");
window.game = new Game();