more style changes

This commit is contained in:
Piotr 'pwh' Hanusiak 2022-04-25 15:05:22 +02:00 committed by David Négrier
parent a50f7a7e9b
commit 310036e832
2 changed files with 14 additions and 6 deletions

View File

@ -61,7 +61,7 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container {
this.frame = this.scene.add.graphics();
this.turnIcon = this.scene.add
.image(this.background.displayWidth * 0.35, this.background.displayHeight * 0.35, "iconTurn")
.setScale(0.25)
.setScale(0.2)
.setAlpha(0.75);
this.drawFrame();
@ -129,11 +129,11 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container {
this.changeAnimation(direction, moving);
this.turnIconTween?.stop();
this.turnIcon.setScale(0.25);
this.turnIcon.setScale(0.2);
this.turnIconTween = this.scene.tweens.add({
targets: [this.turnIcon],
duration: 100,
scale: 0.2,
scale: 0.15,
yoyo: true,
ease: Easing.SineEaseIn,
});

View File

@ -154,7 +154,14 @@ export class CustomizeScene extends AbstractCharacterScene {
if (this.textures.getTextureKeys().includes(`floorTexture${i}`)) {
continue;
}
TexturesHelper.createFloorRectangleTexture(this, `floorTexture${i}`, 50, 50, "floorTiles", i);
TexturesHelper.createFloorRectangleTexture(
this,
`floorTexture${i}`,
WokaBodyPartSlot.SIZE,
WokaBodyPartSlot.SIZE,
"floorTiles",
i
);
}
}
@ -328,13 +335,14 @@ export class CustomizeScene extends AbstractCharacterScene {
}
private handleCustomWokaPreviewerOnResize(): void {
const ratio = innerHeight / innerWidth;
this.customWokaPreviewer.x = this.cameras.main.worldView.x + this.cameras.main.width / 2;
this.customWokaPreviewer.y = this.customWokaPreviewer.displayHeight * 0.5 + 10;
this.customWokaPreviewer.y = this.customWokaPreviewer.displayHeight * 0.5 + (ratio > 1.6 ? 40 : 10);
}
private handleBodyPartButtonsOnResize(): void {
const ratio = innerHeight / innerWidth;
const slotDimension = 50;
const slotDimension = WokaBodyPartSlot.SIZE;
for (const part in this.bodyPartsButtons) {
this.bodyPartsButtons[part as CustomWokaBodyPart].setDisplaySize(slotDimension, slotDimension);