46 lines
1.3 KiB
JavaScript
46 lines
1.3 KiB
JavaScript
import * as Phaser from 'phaser';
|
|
import { GAME_HEIGHT, GAME_WIDTH, COLORS } from './config.js';
|
|
import BootScene from './scenes/BootScene.js';
|
|
import PreloadScene from './scenes/PreloadScene.js';
|
|
import LandingScene from './scenes/LandingScene.js';
|
|
import LoginScene from './scenes/LoginScene.js';
|
|
import RegisterScene from './scenes/RegisterScene.js';
|
|
import VerifyScene from './scenes/VerifyScene.js';
|
|
import ProfileScene from './scenes/ProfileScene.js';
|
|
import GameMenuScene from './scenes/GameMenuScene.js';
|
|
import OpponentSelectScene from './scenes/OpponentSelectScene.js';
|
|
import LobbyScene from './scenes/LobbyScene.js';
|
|
import GameRoomScene from './scenes/GameRoomScene.js';
|
|
import BackgammonGame from './games/backgammon/BackgammonGame.js';
|
|
import HoldemGame from './games/holdem/HoldemGame.js';
|
|
|
|
const config = {
|
|
type: Phaser.AUTO,
|
|
parent: 'game-container',
|
|
backgroundColor: COLORS.bgHex,
|
|
scale: {
|
|
mode: Phaser.Scale.FIT,
|
|
autoCenter: Phaser.Scale.CENTER_BOTH,
|
|
width: GAME_WIDTH,
|
|
height: GAME_HEIGHT,
|
|
},
|
|
dom: { createContainer: true },
|
|
scene: [
|
|
BootScene,
|
|
PreloadScene,
|
|
LandingScene,
|
|
LoginScene,
|
|
RegisterScene,
|
|
VerifyScene,
|
|
ProfileScene,
|
|
GameMenuScene,
|
|
OpponentSelectScene,
|
|
LobbyScene,
|
|
GameRoomScene,
|
|
BackgammonGame,
|
|
HoldemGame,
|
|
],
|
|
};
|
|
|
|
new Phaser.Game(config);
|