workadventure/front/src/index.ts
gparant 5d463d097a Refactor Class
- Add MapManager permit to create map, camera and player.
 - Add CameraManager permit to move and update camera.
 - Add player Call extended of Phaser.GameObjects.Sprite. Permit to manager player data and moving in the map.
 - Add Animation class permit to manage the player animations.
2020-04-07 19:23:21 +02:00

23 lines
655 B
TypeScript

import 'phaser';
import GameConfig = Phaser.Types.Core.GameConfig;
import {GameScene} from "./Phaser/GameScene";
import {Connexion} from "./Connexion";
import {RESOLUTION} from "./Enum/EnvironmentVariable";
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");