Prettier fixes on front
This commit is contained in:
parent
9b29fde1b3
commit
07ba532c5e
@ -13,11 +13,10 @@ export class Loader {
|
|||||||
private progressContainer!: Phaser.GameObjects.Graphics;
|
private progressContainer!: Phaser.GameObjects.Graphics;
|
||||||
private progress!: Phaser.GameObjects.Graphics;
|
private progress!: Phaser.GameObjects.Graphics;
|
||||||
private progressAmount: number = 0;
|
private progressAmount: number = 0;
|
||||||
private logo: Phaser.GameObjects.Image|undefined;
|
private logo: Phaser.GameObjects.Image | undefined;
|
||||||
private loadingText: Phaser.GameObjects.Text | null = null;
|
private loadingText: Phaser.GameObjects.Text | null = null;
|
||||||
|
|
||||||
public constructor(private scene: Phaser.Scene) {
|
public constructor(private scene: Phaser.Scene) {}
|
||||||
}
|
|
||||||
|
|
||||||
public addLoader(): void {
|
public addLoader(): void {
|
||||||
// If there is nothing to load, do not display the loader.
|
// If there is nothing to load, do not display the loader.
|
||||||
@ -30,11 +29,19 @@ export class Loader {
|
|||||||
const promiseLoadLogoTexture = new Promise<Phaser.GameObjects.Image>((res) => {
|
const promiseLoadLogoTexture = new Promise<Phaser.GameObjects.Image>((res) => {
|
||||||
if (this.scene.load.textureManager.exists(LogoNameIndex)) {
|
if (this.scene.load.textureManager.exists(LogoNameIndex)) {
|
||||||
return res(
|
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 {
|
} else {
|
||||||
//add loading if logo image is not ready
|
//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.spritesheet(LogoNameIndex, LogoResource, LogoFrame);
|
||||||
this.scene.load.once(`filecomplete-spritesheet-${LogoNameIndex}`, () => {
|
this.scene.load.once(`filecomplete-spritesheet-${LogoNameIndex}`, () => {
|
||||||
@ -42,7 +49,11 @@ export class Loader {
|
|||||||
this.loadingText.destroy();
|
this.loadingText.destroy();
|
||||||
}
|
}
|
||||||
return res(
|
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 {
|
public removeLoader(): void {
|
||||||
if (this.scene.load.textureManager.exists(LogoNameIndex)) {
|
if (this.scene.load.textureManager.exists(LogoNameIndex)) {
|
||||||
this.scene.load.textureManager.remove(LogoNameIndex);
|
this.scene.load.textureManager.remove(LogoNameIndex);
|
||||||
|
@ -4,7 +4,7 @@ import { EnableCameraSceneName } from "./EnableCameraScene";
|
|||||||
import { CustomizeSceneName } from "./CustomizeScene";
|
import { CustomizeSceneName } from "./CustomizeScene";
|
||||||
import { localUserStore } from "../../Connexion/LocalUserStore";
|
import { localUserStore } from "../../Connexion/LocalUserStore";
|
||||||
import { loadAllDefaultModels } from "../Entity/PlayerTexturesLoadingManager";
|
import { loadAllDefaultModels } from "../Entity/PlayerTexturesLoadingManager";
|
||||||
import { Loader} from "../Components/Loader";
|
import { Loader } from "../Components/Loader";
|
||||||
import type { BodyResourceDescriptionInterface } from "../Entity/PlayerTextures";
|
import type { BodyResourceDescriptionInterface } from "../Entity/PlayerTextures";
|
||||||
import { AbstractCharacterScene } from "./AbstractCharacterScene";
|
import { AbstractCharacterScene } from "./AbstractCharacterScene";
|
||||||
import { areCharacterLayersValid } from "../../Connexion/LocalUser";
|
import { areCharacterLayersValid } from "../../Connexion/LocalUser";
|
||||||
|
Loading…
Reference in New Issue
Block a user