2021-10-17 17:08:16 +02:00
|
|
|
import Phaser, { Game } from 'phaser'
|
2021-10-12 15:30:05 +02:00
|
|
|
|
2021-10-17 15:34:09 +02:00
|
|
|
import PlayScene from './scenes/PlayScene'
|
2021-10-17 17:08:16 +02:00
|
|
|
import GameOverScene from './scenes/GameOverScene'
|
2021-10-17 18:16:38 +02:00
|
|
|
import StartScene from './scenes/StartScene'
|
2021-10-12 15:30:05 +02:00
|
|
|
|
|
|
|
|
const config: Phaser.Types.Core.GameConfig = {
|
|
|
|
|
type: Phaser.AUTO,
|
2021-10-13 18:46:21 +02:00
|
|
|
|
2021-10-12 15:30:05 +02:00
|
|
|
width: 800,
|
|
|
|
|
height: 600,
|
2021-10-13 18:46:21 +02:00
|
|
|
|
2021-10-18 00:13:52 +02:00
|
|
|
parent: "gameBox",
|
|
|
|
|
|
2021-10-12 15:30:05 +02:00
|
|
|
physics: {
|
|
|
|
|
default: 'arcade',
|
|
|
|
|
arcade: {
|
2021-10-14 18:41:45 +02:00
|
|
|
debug: false
|
2021-10-12 15:30:05 +02:00
|
|
|
}
|
|
|
|
|
},
|
2021-10-17 18:16:38 +02:00
|
|
|
scene: [StartScene, PlayScene, GameOverScene]
|
2021-10-12 15:30:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default new Phaser.Game(config)
|