Add scene solely dedicated to preloading assets

This commit is contained in:
Peter Stockings
2026-01-05 12:47:09 +11:00
parent 86a6afd1df
commit 161da3a64a
10 changed files with 67 additions and 12 deletions

View File

@@ -42,13 +42,6 @@ export class GameScene extends Phaser.Scene {
super("GameScene");
}
preload() {
this.load.spritesheet("warrior", "warrior.png", { frameWidth: 12, frameHeight: 15 });
this.load.spritesheet("rat", "rat.png", { frameWidth: 16, frameHeight: 15 });
this.load.spritesheet("bat", "bat.png", { frameWidth: 15, frameHeight: 15 });
this.load.spritesheet("tiles0", "assets/tiles0.png", { frameWidth: 16, frameHeight: 16 });
}
create() {
this.cursors = this.input.keyboard!.createCursorKeys();