workadventure/front/src/index.ts
gparant 7e08e7f133 Front : create class to connect, send and receive message
- Create environment class
 - Create Connexion class to connect and save data
 - Refactor back api
2020-04-05 20:57:14 +02:00

24 lines
616 B
TypeScript

import 'phaser';
import GameConfig = Phaser.Types.Core.GameConfig;
import {GameScene} from "./GameScene";
import {Connexion} from "./Connexion";
const resolution = 2;
const config: GameConfig = {
title: "Office game",
width: window.innerWidth / resolution,
height: window.innerHeight / resolution,
parent: "game",
scene: [GameScene],
zoom: resolution,
};
let game = new Phaser.Game(config);
window.addEventListener('resize', function (event) {
game.scale.resize(window.innerWidth / resolution, window.innerHeight / resolution);
});
const connexion = new Connexion("test@gmail.com");