rewrote to run in event loop

This commit is contained in:
jonny 2021-04-21 11:54:37 +02:00
parent 6c6789411a
commit 006195e8cc

View File

@ -74,6 +74,7 @@ import CanvasTexture = Phaser.Textures.CanvasTexture;
import GameObject = Phaser.GameObjects.GameObject; import GameObject = Phaser.GameObjects.GameObject;
import FILE_LOAD_ERROR = Phaser.Loader.Events.FILE_LOAD_ERROR; import FILE_LOAD_ERROR = Phaser.Loader.Events.FILE_LOAD_ERROR;
import DOMElement = Phaser.GameObjects.DOMElement; import DOMElement = Phaser.GameObjects.DOMElement;
import EVENT_TYPE =Phaser.Scenes.Events
import {Subscription} from "rxjs"; import {Subscription} from "rxjs";
import {worldFullMessageStream} from "../../Connexion/WorldFullMessageStream"; import {worldFullMessageStream} from "../../Connexion/WorldFullMessageStream";
import { lazyLoadCompanionResource } from "../Companion/CompanionTexturesLoadingManager"; import { lazyLoadCompanionResource } from "../Companion/CompanionTexturesLoadingManager";
@ -843,8 +844,9 @@ ${escapedMessage}
})); }));
this.iframeSubscriptionList.push(iframeListener.loadPageStream.subscribe((url:string)=>{ this.iframeSubscriptionList.push(iframeListener.loadPageStream.subscribe((url:string)=>{
this.loadNextGame(url).then(()=>{ this.loadNextGame(url).then(()=>{
this.scene.systems.settings.isTransition=true this.events.once(EVENT_TYPE.POST_UPDATE,()=>{
this.onMapExit(url) this.onMapExit(url);
})
}) })
})); }));
let scriptedBubbleSprite : Sprite; let scriptedBubbleSprite : Sprite;