import Phaser from 'phaser';
import { GAME_WIDTH, GAME_HEIGHT } from './utils/constants';
import { BootScene } from './scenes/BootScene';
import { MenuScene } from './scenes/MenuScene';
import { GameScene } from './scenes/GameScene';
import { IntroScene } from './scenes/IntroScene';

// Configuration Phaser
const config: Phaser.Types.Core.GameConfig = {
    type: Phaser.AUTO,
    parent: 'game-container',
    width: GAME_WIDTH,
    height: GAME_HEIGHT,
    scale: {
        mode: Phaser.Scale.FIT,
        autoCenter: Phaser.Scale.CENTER_BOTH,
    },
    physics: {
        default: 'arcade',
        arcade: {
            gravity: { y: 0, x: 0 }, // Gravité définie par objet
            debug: false, // Mettre à true pour voir les hitboxes
        },
    },
    scene: [BootScene, IntroScene, MenuScene, GameScene],
    backgroundColor: '#87CEEB',
    render: {
        pixelArt: false,
        antialias: true,
    },
    audio: {
        disableWebAudio: false,
    },
};

export default config;
