add exitUrl script
This commit is contained in:
@@ -82,6 +82,7 @@ import CanvasTexture = Phaser.Textures.CanvasTexture;
|
||||
import GameObject = Phaser.GameObjects.GameObject;
|
||||
import FILE_LOAD_ERROR = Phaser.Loader.Events.FILE_LOAD_ERROR;
|
||||
import DOMElement = Phaser.GameObjects.DOMElement;
|
||||
import EVENT_TYPE =Phaser.Scenes.Events;
|
||||
import {Subscription} from "rxjs";
|
||||
import {worldFullMessageStream} from "../../Connexion/WorldFullMessageStream";
|
||||
import { lazyLoadCompanionResource } from "../Companion/CompanionTexturesLoadingManager";
|
||||
@@ -898,6 +899,14 @@ export class GameScene extends ResizableScene implements CenterListener {
|
||||
}, this.userInputManager);
|
||||
}
|
||||
}));
|
||||
|
||||
this.iframeSubscriptionList.push(iframeListener.exitUrlStream.subscribe((url:string)=>{
|
||||
this.loadNextGame(url).then(()=>{
|
||||
this.events.once(EVENT_TYPE.POST_UPDATE,()=>{
|
||||
this.onMapExit(url);
|
||||
})
|
||||
})
|
||||
}));
|
||||
}
|
||||
|
||||
private getMapDirUrl(): string {
|
||||
|
||||
Reference in New Issue
Block a user