zooming was breaking CustomizationScene on second entry
This commit is contained in:
parent
2e28303c30
commit
deaf6cd3f9
@ -9,7 +9,6 @@ import { areCharacterLayersValid } from "../../Connexion/LocalUser";
|
||||
import { SelectCharacterSceneName } from "./SelectCharacterScene";
|
||||
import { waScaleManager } from "../Services/WaScaleManager";
|
||||
import { analyticsClient } from "../../Administration/AnalyticsClient";
|
||||
import { isMediaBreakpointUp } from "../../Utils/BreakpointsUtils";
|
||||
import { PUSHER_URL } from "../../Enum/EnvironmentVariable";
|
||||
import {
|
||||
CustomWokaBodyPart,
|
||||
@ -95,6 +94,7 @@ export class CustomizeScene extends AbstractCharacterScene {
|
||||
}
|
||||
|
||||
public create(): void {
|
||||
waScaleManager.zoomModifier = 1;
|
||||
this.createSlotBackgroundTextures();
|
||||
this.initializeCustomWokaPreviewer();
|
||||
this.initializeBodyPartsDraggableGrid();
|
||||
@ -141,18 +141,19 @@ export class CustomizeScene extends AbstractCharacterScene {
|
||||
|
||||
gameManager.setCharacterLayers(layers);
|
||||
this.scene.stop(CustomizeSceneName);
|
||||
waScaleManager.restoreZoom();
|
||||
gameManager.tryResumingGame(EnableCameraSceneName);
|
||||
}
|
||||
|
||||
public backToPreviousScene() {
|
||||
this.scene.stop(CustomizeSceneName);
|
||||
waScaleManager.restoreZoom();
|
||||
this.scene.run(SelectCharacterSceneName);
|
||||
}
|
||||
|
||||
private createSlotBackgroundTextures(): void {
|
||||
for (let i = 0; i < 4; i += 1) {
|
||||
if (this.textures.getTextureKeys().includes(`floorTexture${i}`)) {
|
||||
continue;
|
||||
}
|
||||
TexturesHelper.createFloorRectangleTexture(this, `floorTexture${i}`, 50, 50, "floorTiles", i);
|
||||
}
|
||||
}
|
||||
@ -467,11 +468,6 @@ export class CustomizeScene extends AbstractCharacterScene {
|
||||
private bindEventHandlers(): void {
|
||||
this.bindKeyboardEventHandlers();
|
||||
|
||||
this.events.addListener("wake", () => {
|
||||
waScaleManager.saveZoom();
|
||||
waScaleManager.zoomModifier = isMediaBreakpointUp("md") ? 3 : 1;
|
||||
});
|
||||
|
||||
this.randomizeButton.on(Phaser.Input.Events.POINTER_UP, () => {
|
||||
this.randomizeOutfit();
|
||||
this.clearGrid();
|
||||
|
@ -9,6 +9,7 @@ import { get } from "svelte/store";
|
||||
import { localeDetector } from "../../i18n/locales";
|
||||
import { PlayerTextures } from "../Entity/PlayerTextures";
|
||||
import { PUSHER_URL } from "../../Enum/EnvironmentVariable";
|
||||
import { CustomizeSceneName } from "./CustomizeScene";
|
||||
|
||||
export const EntrySceneName = "EntryScene";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user