rewrote the authorisation flow: give more responsability to gameManager and less to gameScene

This commit is contained in:
arp 2020-10-12 16:23:07 +02:00
parent 032facb75f
commit 02c193a262
14 changed files with 244 additions and 170 deletions

View file

@ -56,7 +56,8 @@ export class RoomConnection implements RoomConnection {
*/
public constructor(token: string|null, roomId: string, name: string, characterLayers: string[], position: PositionInterface, viewport: ViewportInterface) {
let url = API_URL.replace('http://', 'ws://').replace('https://', 'wss://');
url += '/room/'+roomId
url += '/room';
url += '?roomId='+(roomId ?encodeURIComponent(roomId):'');
url += '?token='+(token ?encodeURIComponent(token):'');
url += '&name='+encodeURIComponent(name);
for (const layer of characterLayers) {