2020-04-03 14:56:21 +02:00
|
|
|
import 'phaser';
|
|
|
|
import GameConfig = Phaser.Types.Core.GameConfig;
|
2020-04-07 19:23:21 +02:00
|
|
|
import {GameScene} from "./Phaser/GameScene";
|
2020-04-05 20:57:14 +02:00
|
|
|
import {Connexion} from "./Connexion";
|
2020-04-06 22:55:09 +02:00
|
|
|
import {RESOLUTION} from "./Enum/EnvironmentVariable";
|
2020-04-03 14:56:21 +02:00
|
|
|
|
|
|
|
const config: GameConfig = {
|
|
|
|
title: "Office game",
|
2020-04-06 22:55:09 +02:00
|
|
|
width: window.innerWidth / RESOLUTION,
|
|
|
|
height: window.innerHeight / RESOLUTION,
|
2020-04-03 14:56:21 +02:00
|
|
|
parent: "game",
|
|
|
|
scene: [GameScene],
|
2020-04-06 22:55:09 +02:00
|
|
|
zoom: RESOLUTION,
|
2020-04-03 14:56:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
let game = new Phaser.Game(config);
|
2020-04-03 18:41:06 +02:00
|
|
|
|
|
|
|
window.addEventListener('resize', function (event) {
|
2020-04-06 22:55:09 +02:00
|
|
|
game.scale.resize(window.innerWidth / RESOLUTION, window.innerHeight / RESOLUTION);
|
2020-04-04 16:06:38 +02:00
|
|
|
});
|
2020-04-05 20:57:14 +02:00
|
|
|
|
|
|
|
const connexion = new Connexion("test@gmail.com");
|