====== Startdatei App.ts ====== Diese Datei wird nach dem Laden der phaser-Bibliothek in der index.html-Datei geladen und damit gestartet. Sie führt nur eine einzige Anweisung aus: new Phaser.Game(config); Damit bekommt Phaser die Kontrolle. Anschließend startet Phaser die erste Scene aus der Scene-Liste (''new StartScene()''). import { gameHeight, gameWidth } from "./Globals.js"; import { GameOverScene } from "./gameoverscene/GameOverScene.js"; import { MainScene } from "./mainscene/MainScene.js"; import { ScoreScene } from "./scorescene/ScoreScene.js"; import { StartScene } from "./startscene/StartScene.js"; // Game config, see https://photonstorm.github.io/phaser3-docs/Phaser.Types.Core.html#.GameConfig var config: Phaser.Types.Core.GameConfig = { type: Phaser.AUTO, scale: { mode: Phaser.Scale.FIT, parent: 'game', autoCenter: Phaser.Scale.CENTER_BOTH, width: gameWidth, height: gameHeight }, antialias: false, // we WANT to see pixels! // on startup phaser launches first scene in this list: scene: [ new StartScene(), new MainScene(), new ScoreScene(), new GameOverScene() ], // physics is not used in this game, but perhaps we need it later: physics: { default: "arcade", arcade: { debug: false } }, input: { gamepad: true } }; new Phaser.Game(config);