Reverts adding scale to the camera updated event and uses it directly from the website manager

This commit is contained in:
Benedicte Quimbert 2021-11-26 14:46:02 +01:00
parent f761858328
commit 7eda8a45a7
3 changed files with 35 additions and 39 deletions

View file

@ -754,13 +754,13 @@ export class GameScene extends DirtyScene {
//listen event to share the actual worldView when the camera is updated
this.cameras.main.on("followupdate", (camera: Camera) => {
const worldView: WasCameraUpdatedEvent = {
const cameraEvent: WasCameraUpdatedEvent = {
x: camera.worldView.x,
y: camera.worldView.y,
width: camera.worldView.width,
height: camera.worldView.height,
};
iframeListener.sendCameraUpdated(worldView);
iframeListener.sendCameraUpdated(cameraEvent);
});
// Set up variables manager
@ -1290,7 +1290,6 @@ ${escapedMessage}
layoutManagerActionStore.removeAction(message.uuid);
});
iframeListener.registerAnswerer("getPlayerPosition", () => {
return {
x: this.CurrentPlayer.x,