preserve current WOKA when getting into customization

This commit is contained in:
Piotr 'pwh' Hanusiak 2022-04-25 15:36:46 +02:00 committed by David Négrier
parent 310036e832
commit bc219d0139

View File

@ -94,6 +94,15 @@ export class CustomizeScene extends AbstractCharacterScene {
} }
public create(): void { public create(): void {
const savedWokaLayers = gameManager.getCharacterLayers();
if (savedWokaLayers && savedWokaLayers.length !== 0) {
this.selectedLayers = [];
for (let i = 0; i < savedWokaLayers.length; i += 1) {
this.selectedLayers.push(
this.layers[i].findIndex((item) => item.id === gameManager.getCharacterLayers()[i])
);
}
}
waScaleManager.zoomModifier = 1; waScaleManager.zoomModifier = 1;
this.createSlotBackgroundTextures(); this.createSlotBackgroundTextures();
this.initializeCustomWokaPreviewer(); this.initializeCustomWokaPreviewer();