23 lines
852 B
JavaScript
23 lines
852 B
JavaScript
/**
|
|
* Dev-only smoke test: boots the game directly into the GameScene
|
|
* (skipping the menu), so the flight scene can be screenshotted/checked
|
|
* without clicking "New Game".
|
|
*
|
|
* python3 -m http.server 8080
|
|
* firefox --headless --screenshot shot.png \
|
|
* --window-size=1280,720 http://localhost:8080/dev/test-game.html
|
|
*/
|
|
import Phaser from '../js/vendor/phaser.js';
|
|
import { config } from '../js/config/Config.js';
|
|
import { ConfigLoader } from '../js/config/ConfigLoader.js';
|
|
import { createGameConfig } from '../js/config/GameConfig.js';
|
|
import { GameScene } from '../js/scenes/GameScene.js';
|
|
|
|
const data = await ConfigLoader.load();
|
|
config.init(data);
|
|
const gameConfig = createGameConfig();
|
|
gameConfig.scene = [GameScene];
|
|
const game = new Phaser.Game(gameConfig);
|
|
window.game = game;
|
|
console.info('smoke: game booted into GameScene');
|