Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static createGame() {
- console.log('game creation phaser called with config');
- game = new Phaser.Game(CONFIG);
- return game;
- }
- static destroyGame(game) {
- console.log("destroying game")
- game.destroy();
- game = null;
- }
- }
- const CONFIG = {
- type: Phaser.WEBGL,
- width: 720 * window.devicePixelRatio,
- height: 500 * window.devicePixelRatio,
- scene: [ModeSelectScene, PreLoadScene, PlayGame, GameOverScene],
- backgroundColor: 0x0c88c7,
- parent: 'game',
- scale: {
- mode: Phaser.Scale.FIT,
- autoCenter: Phaser.Scale.CENTER_BOTH,
- parent: 'game',
- width: 1334,
- height: 750,
- },
- physics: {
- default: 'arcade',
- },
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement