Fix error mapping refresh in back & the end of this feature development

This commit is contained in:
gparant 2020-05-10 23:49:08 +02:00
parent 8b9c36e3be
commit f4af824cf9
21 changed files with 17 additions and 1840 deletions

View file

@ -3,11 +3,13 @@ const API_URL = process.env.API_URL || "http://api.workadventure.localhost";
const ROOM = [process.env.ROOM || "THECODINGMACHINE"];
const RESOLUTION = 3;
const ZOOM_LEVEL = 1/*3/4*/;
const MAP_FILE_URL = `${API_URL}/map/files`;
export {
DEBUG_MODE,
API_URL,
RESOLUTION,
ZOOM_LEVEL,
ROOM
ROOM,
MAP_FILE_URL
}

View file

@ -8,7 +8,7 @@ import Rectangle = Phaser.GameObjects.Rectangle;
import {PLAYER_RESOURCES} from "../Entity/PlayableCaracter";
import {cypressAsserter} from "../../Cypress/CypressAsserter";
import {GroupCreatedUpdatedMessageInterface, MessageUserPositionInterface} from "../../Connexion";
import {API_URL} from "../../Enum/EnvironmentVariable";
import {MAP_FILE_URL} from "../../Enum/EnvironmentVariable";
export function getMapKeyByUrl(mapUrlStart: string){
let tab = mapUrlStart.split("/");
@ -104,7 +104,7 @@ export class LogincScene extends Phaser.Scene implements GameSceneInterface {
return;
}
let key = getMapKeyByUrl(scene.mapUrlStart);
let game = new GameScene(key,`${API_URL}${scene.mapUrlStart}`);
let game = new GameScene(key,`${MAP_FILE_URL}${scene.mapUrlStart}`);
this.scene.add(key, game, false);
this.scene.start(key);
return scene;