| 1234567891011121314151617181920212223242526272829303132 |
- window.addEventListener('load', function () {
- var game = new Phaser.Game({
- width: 1280,
- height: 720,
- type: Phaser.AUTO,
- backgroundColor: "#242424",
- scale: {
- mode: Phaser.Scale.FIT,
- autoCenter: Phaser.Scale.CENTER_BOTH
- }
- });
- game.scene.add("Preload", Preload);
- game.scene.add("Level", Level);
- game.scene.add("Boot", Boot, true);
- });
- class Boot extends Phaser.Scene {
- preload() {
-
- this.load.pack("pack", "assets/preload-asset-pack.json");
- }
- create() {
-
- this.scene.start("Preload");
- }
- }
|