File size: 539 Bytes
c679a93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//// <reference path="../phaser.d.ts" />

import Phaser, { Game } from 'phaser'
import BootScene from './scenes/bootScene.js'
import GameScene from './scenes/gameScene.js'
import FullScreenEvent from './components/fullscreenEvent.js'

const config = {
  type: Phaser.AUTO,
  scale: {
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH,
    width: 896,
    height: 504
  },
  scene: [BootScene, GameScene]
}

window.addEventListener('load', () => {
  const game = new Game(config)
  FullScreenEvent(() => resize(game))
})