Refactoring/centralizing map loading in GameManager
This commit is contained in:
parent
c846aff456
commit
9417e4a4d2
3 changed files with 20 additions and 5 deletions
|
@ -103,9 +103,7 @@ export class LogincScene extends Phaser.Scene implements GameSceneInterface {
|
|||
if (!scene) {
|
||||
return;
|
||||
}
|
||||
let key = getMapKeyByUrl(scene.mapUrlStart);
|
||||
let game = new GameScene(key,`${MAP_FILE_URL}${scene.mapUrlStart}`);
|
||||
this.scene.add(key, game, false);
|
||||
let key = gameManager.loadMap(scene.mapUrlStart, this.scene);
|
||||
this.scene.start(key);
|
||||
return scene;
|
||||
}).catch((err) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue