From 07ba532c5e256925a0b3206a4daf6f597f41fa8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Wed, 24 Nov 2021 15:31:17 +0100 Subject: [PATCH] Prettier fixes on front --- front/src/Phaser/Components/Loader.ts | 24 +++++++++++++------ .../src/Phaser/Login/SelectCharacterScene.ts | 2 +- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/front/src/Phaser/Components/Loader.ts b/front/src/Phaser/Components/Loader.ts index 0534aa91..e013e758 100644 --- a/front/src/Phaser/Components/Loader.ts +++ b/front/src/Phaser/Components/Loader.ts @@ -13,11 +13,10 @@ export class Loader { private progressContainer!: Phaser.GameObjects.Graphics; private progress!: Phaser.GameObjects.Graphics; private progressAmount: number = 0; - private logo: Phaser.GameObjects.Image|undefined; + private logo: Phaser.GameObjects.Image | undefined; private loadingText: Phaser.GameObjects.Text | null = null; - public constructor(private scene: Phaser.Scene) { - } + public constructor(private scene: Phaser.Scene) {} public addLoader(): void { // If there is nothing to load, do not display the loader. @@ -30,11 +29,19 @@ export class Loader { const promiseLoadLogoTexture = new Promise((res) => { if (this.scene.load.textureManager.exists(LogoNameIndex)) { return res( - this.logo = this.scene.add.image(this.scene.game.renderer.width / 2, this.scene.game.renderer.height / 2 - 150, LogoNameIndex) + (this.logo = this.scene.add.image( + this.scene.game.renderer.width / 2, + this.scene.game.renderer.height / 2 - 150, + LogoNameIndex + )) ); } else { //add loading if logo image is not ready - this.loadingText = this.scene.add.text(this.scene.game.renderer.width / 2, this.scene.game.renderer.height / 2 - 50, TextName); + this.loadingText = this.scene.add.text( + this.scene.game.renderer.width / 2, + this.scene.game.renderer.height / 2 - 50, + TextName + ); } this.scene.load.spritesheet(LogoNameIndex, LogoResource, LogoFrame); this.scene.load.once(`filecomplete-spritesheet-${LogoNameIndex}`, () => { @@ -42,7 +49,11 @@ export class Loader { this.loadingText.destroy(); } return res( - this.logo = this.scene.add.image(this.scene.game.renderer.width / 2, this.scene.game.renderer.height / 2 - 150, LogoNameIndex) + (this.logo = this.scene.add.image( + this.scene.game.renderer.width / 2, + this.scene.game.renderer.height / 2 - 150, + LogoNameIndex + )) ); }); }); @@ -72,7 +83,6 @@ export class Loader { }); } - public removeLoader(): void { if (this.scene.load.textureManager.exists(LogoNameIndex)) { this.scene.load.textureManager.remove(LogoNameIndex); diff --git a/front/src/Phaser/Login/SelectCharacterScene.ts b/front/src/Phaser/Login/SelectCharacterScene.ts index d9861b20..64fa9791 100644 --- a/front/src/Phaser/Login/SelectCharacterScene.ts +++ b/front/src/Phaser/Login/SelectCharacterScene.ts @@ -4,7 +4,7 @@ import { EnableCameraSceneName } from "./EnableCameraScene"; import { CustomizeSceneName } from "./CustomizeScene"; import { localUserStore } from "../../Connexion/LocalUserStore"; import { loadAllDefaultModels } from "../Entity/PlayerTexturesLoadingManager"; -import { Loader} from "../Components/Loader"; +import { Loader } from "../Components/Loader"; import type { BodyResourceDescriptionInterface } from "../Entity/PlayerTextures"; import { AbstractCharacterScene } from "./AbstractCharacterScene"; import { areCharacterLayersValid } from "../../Connexion/LocalUser";