export default class BootScene extends Phaser.Scene {
    constructor() {
        super({ key: 'BootScene' });
    }

    preload() {
        // Tiled JSON map (infinite chunked format)
        this.load.tilemapTiledJSON('level1', '../../assets/tilesets/levels-a.json');

        // Tileset spritesheet (1280x1280, 128x128 tiles)
        // Key must match the name Phaser derives from the TSX source: 'platforms'
        this.load.image('platforms', '../../assets/sprites/platforms.png');

        // Level 1 background image
        this.load.image('level1-bg', '../../assets/images/level1-background.png');

        // Player spritesheet (128x256 per frame)
        this.load.spritesheet('player', '../../assets/sprites/player.png', {
            frameWidth: 128,
            frameHeight: 256,
        });
    }

    create() {
        this.scene.start('Level1Scene');
    }
}
