FIX: rewrote the way scene exits are triggered

This commit is contained in:
kharhamel 2020-11-18 18:15:57 +01:00
parent c5af6df7fa
commit 09d6d22a5d
6 changed files with 135 additions and 129 deletions

View file

@ -1,3 +1,4 @@
import {Room} from "../Connexion/Room";
export enum GameConnexionTypes {
anonymous=1,
@ -44,6 +45,15 @@ class UrlManager {
history.pushState({}, 'WorkAdventure', newUrl);
return newUrl;
}
//todo: is it duplicated with editUrlForRoom() ?
public editUrlForCurrentRoom(room: Room): void {
let path = room.id;
if (room.hash) {
path += '#'+room.hash;
}
history.pushState({}, 'WorkAdventure', path);
}
}