Public texture (#1093)
* Public texture - Front => Get texture when user connected on public method - Front => Anonymous login will be make every connexion to get map details - Pusher => `/anonymLogin` permit to get map details and public texture load in customize scene * Improve texture local user - Permit to keep previous texture get with 'register' link * Texture public loading - Texture will be load with Room class - Fix issue on lazzy loading atttempt * Remove async await useless
This commit is contained in:
parent
9e42d9d05b
commit
2b13b764b4
7 changed files with 75 additions and 19 deletions
|
@ -78,11 +78,11 @@ export class GameManager {
|
|||
|
||||
public async loadMap(room: Room, scenePlugin: Phaser.Scenes.ScenePlugin): Promise<void> {
|
||||
const roomID = room.id;
|
||||
const mapUrl = await room.getMapUrl();
|
||||
const mapDetail = await room.getMapDetail();
|
||||
|
||||
const gameIndex = scenePlugin.getIndex(roomID);
|
||||
if(gameIndex === -1){
|
||||
const game : Phaser.Scene = new GameScene(room, mapUrl);
|
||||
const game : Phaser.Scene = new GameScene(room, mapDetail.mapUrl);
|
||||
scenePlugin.add(roomID, game, false);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue