2025-10-01 13:57:42 +00:00

26 lines
551 B
TypeScript

import Phaser from 'phaser';
import { GameScene } from './GameScene';
import { RINK_LENGTH, RINK_WIDTH, SCALE, FPS } from '../config/constants';
const config: Phaser.Types.Core.GameConfig = {
type: Phaser.AUTO,
width: RINK_LENGTH * SCALE,
height: RINK_WIDTH * SCALE,
parent: 'game-container',
backgroundColor: '#1a1a1a',
physics: {
default: 'arcade',
arcade: {
gravity: { x: 0, y: 0 },
debug: false
}
},
fps: {
target: FPS,
forceSetTimeOut: false
},
scene: [GameScene]
};
new Phaser.Game(config);