20 lines
479 B
TypeScript
20 lines
479 B
TypeScript
import Phaser from 'phaser';
|
|
import { BootScene } from './scenes/BootScene';
|
|
import { MenuScene } from './scenes/MenuScene';
|
|
import { GameScene } from './scenes/GameScene';
|
|
|
|
const config: Phaser.Types.Core.GameConfig = {
|
|
type: Phaser.AUTO,
|
|
width: 1280,
|
|
height: 720,
|
|
backgroundColor: '#1a5c2a',
|
|
parent: 'game',
|
|
scene: [BootScene, MenuScene, GameScene],
|
|
scale: {
|
|
mode: Phaser.Scale.FIT,
|
|
autoCenter: Phaser.Scale.CENTER_BOTH,
|
|
},
|
|
};
|
|
|
|
new Phaser.Game(config);
|