diff options
Diffstat (limited to 'client/src/app.ts')
| -rw-r--r-- | client/src/app.ts | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/client/src/app.ts b/client/src/app.ts index c6bad67..197fb63 100644 --- a/client/src/app.ts +++ b/client/src/app.ts @@ -1,26 +1,19 @@ -// import Phaser from 'phaser'; -import AkkamonStartScene from './scene'; -import { AkkamonUI } from './uiScene'; -import { Client } from './client'; - -const serviceUrl = 'ws://localhost:8080'; - -export const akkamonClient = new Client(serviceUrl); - -const config: Phaser.Types.Core.GameConfig & Phaser.Types.Core.RenderConfig = { - type: Phaser.AUTO, - backgroundColor: '#125555', - width: 800, - height: 600, - pixelArt: true, - scene: [AkkamonStartScene, AkkamonUI] -}; - -const game: Phaser.Game = new Phaser.Game(config); +// // import Phaser from 'phaser'; +// import AkkamonStartScene from './scene'; +// import { AkkamonUI } from './uiScene'; +// import { Client } from './client'; +// +// const serviceUrl = 'ws://localhost:8080'; +// +// export const akkamonClient = new Client(serviceUrl); +// +// +// const game: Phaser.Game = new Phaser.Game(config); import Phaser from 'phaser'; -import gameConfig from './app/gameConfig.js'; +import { gameConfig } from './akkamon/GameConfig'; +import { Client } from './akkamon/client/Client'; function newGame () { if (game) return; @@ -30,10 +23,10 @@ function newGame () { function destroyGame () { if (!game) return; game.destroy(true); - game.runDestroy(); game = null; } -let game; +export let client = new Client('ws://localhost:8080'); +let game: Phaser.Game | null | undefined; if (!game) newGame(); |
