improved the local storage of the the selectcharacterScene
This commit is contained in:
parent
88a1e899a3
commit
f5aa70ddc2
4 changed files with 75 additions and 83 deletions
|
@ -1,7 +1,6 @@
|
|||
import {GameScene} from "./GameScene";
|
||||
import {connectionManager} from "../../Connexion/ConnectionManager";
|
||||
import {Room} from "../../Connexion/Room";
|
||||
import {FourOFourSceneName} from "../Reconnecting/FourOFourScene";
|
||||
|
||||
export interface HasMovedEvent {
|
||||
direction: string;
|
||||
|
@ -24,11 +23,7 @@ export class GameManager {
|
|||
this.playerName = name;
|
||||
}
|
||||
|
||||
public setCharacterUserSelected(characterUserSelected : string): void {
|
||||
this.characterLayers = [characterUserSelected];
|
||||
}
|
||||
|
||||
public setCharacterLayers(layers: string[]) {
|
||||
public setCharacterLayers(layers: string[]): void {
|
||||
this.characterLayers = layers;
|
||||
}
|
||||
|
||||
|
@ -54,13 +49,6 @@ export class GameManager {
|
|||
}
|
||||
}
|
||||
|
||||
public getMapKeyByUrl(mapUrlStart: string) : string {
|
||||
// FIXME: the key should be computed from the full URL of the map.
|
||||
const startPos = mapUrlStart.indexOf('://')+3;
|
||||
const endPos = mapUrlStart.indexOf(".json");
|
||||
return mapUrlStart.substring(startPos, endPos);
|
||||
}
|
||||
|
||||
public async goToStartingMap(scenePlugin: Phaser.Scenes.ScenePlugin) {
|
||||
const url = await this.startRoom.getMapUrl();
|
||||
console.log('Starting scene '+url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue