Pierre Wessman 40d07ee68c ...
2025-10-02 08:11:21 +02:00

26 lines
558 B
TypeScript

import Phaser from 'phaser';
import { GameScene } from './GameScene';
import { RINK_LENGTH, RINK_WIDTH, SCALE, FPS, DEBUG } 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: DEBUG
}
},
fps: {
target: FPS,
forceSetTimeOut: false
},
scene: [GameScene]
};
new Phaser.Game(config);