Refactoring reconnection: putting it into the GameScene directly.
This commit is contained in:
parent
d785a8a1bf
commit
f88f28db3f
5 changed files with 101 additions and 58 deletions
|
@ -122,7 +122,7 @@ export class GameManager {
|
|||
this.currentGameScene = null;
|
||||
}
|
||||
|
||||
private timeoutCallback: NodeJS.Timeout|null = null;
|
||||
/*private timeoutCallback: NodeJS.Timeout|null = null;
|
||||
reconnectToGameScene(lastPositionShared: PointInterface): void {
|
||||
if (this.timeoutCallback !== null) {
|
||||
console.log('Reconnect called but setTimeout in progress for the reconnection');
|
||||
|
@ -150,7 +150,7 @@ export class GameManager {
|
|||
const game : Phaser.Scene = GameScene.createFromUrl(this.oldMapUrlFile, this.oldInstance);
|
||||
this.reconnectScene.scene.add(this.oldSceneKey, game, true, { initPosition: lastPositionShared });
|
||||
this.reconnectScene = null;
|
||||
}
|
||||
}*/
|
||||
|
||||
private getCurrentGameScene(): GameScene {
|
||||
if (this.currentGameScene === null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue