🎉 initial commit
This commit is contained in:
30
src/main.ts
Normal file
30
src/main.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import Phaser from 'phaser'
|
||||
import { BootScene } from './scenes/BootScene'
|
||||
import { GameScene } from './scenes/GameScene'
|
||||
import { UIScene } from './scenes/UIScene'
|
||||
|
||||
const config: Phaser.Types.Core.GameConfig = {
|
||||
type: Phaser.AUTO,
|
||||
width: window.innerWidth,
|
||||
height: window.innerHeight,
|
||||
backgroundColor: '#1a1a2e',
|
||||
physics: {
|
||||
default: 'arcade',
|
||||
arcade: {
|
||||
gravity: { x: 0, y: 0 },
|
||||
debug: false,
|
||||
},
|
||||
},
|
||||
scene: [BootScene, GameScene, UIScene],
|
||||
scale: {
|
||||
mode: Phaser.Scale.RESIZE,
|
||||
autoCenter: Phaser.Scale.CENTER_BOTH,
|
||||
},
|
||||
render: {
|
||||
pixelArt: false,
|
||||
antialias: true,
|
||||
roundPixels: true,
|
||||
},
|
||||
}
|
||||
|
||||
new Phaser.Game(config)
|
||||
Reference in New Issue
Block a user