cleanup
This commit is contained in:
parent
f446918e42
commit
fcf8659829
@ -1,27 +0,0 @@
|
||||
import Container = Phaser.GameObjects.Container;
|
||||
import type { Scene } from "phaser";
|
||||
import Sprite = Phaser.GameObjects.Sprite;
|
||||
import { getPlayerAnimations, PlayerAnimationDirections, PlayerAnimationTypes } from "../Player/Animation";
|
||||
|
||||
/**
|
||||
* A sprite of a customized character (used in the Customize Scene only)
|
||||
*/
|
||||
export class CustomizedCharacter extends Container {
|
||||
private sprites: Phaser.GameObjects.Sprite[];
|
||||
|
||||
public constructor(scene: Scene, x: number, y: number, layers: string[]) {
|
||||
super(scene, x, y);
|
||||
this.sprites = [];
|
||||
this.updateSprites(layers);
|
||||
}
|
||||
|
||||
public updateSprites(layers: string[]): void {
|
||||
this.sprites = [];
|
||||
this.removeAll(true);
|
||||
for (const texture of layers) {
|
||||
const newSprite = new Sprite(this.scene, 0, 0, texture);
|
||||
this.sprites.push(newSprite);
|
||||
}
|
||||
this.add(this.sprites);
|
||||
}
|
||||
}
|
@ -8,7 +8,6 @@ import { AbstractCharacterScene } from "./AbstractCharacterScene";
|
||||
import { areCharacterLayersValid } from "../../Connexion/LocalUser";
|
||||
import { SelectCharacterSceneName } from "./SelectCharacterScene";
|
||||
import { waScaleManager } from "../Services/WaScaleManager";
|
||||
import { CustomizedCharacter } from "../Entity/CustomizedCharacter";
|
||||
import { analyticsClient } from "../../Administration/AnalyticsClient";
|
||||
import { isMediaBreakpointUp } from "../../Utils/BreakpointsUtils";
|
||||
import { PUSHER_URL } from "../../Enum/EnvironmentVariable";
|
||||
@ -40,7 +39,6 @@ export class CustomizeScene extends AbstractCharacterScene {
|
||||
private finishButton!: Button;
|
||||
|
||||
private selectedLayers: number[] = [0, 0, 0, 0, 0, 0];
|
||||
private containersRow: CustomizedCharacter[][] = [];
|
||||
private layers: BodyResourceDescriptionInterface[][] = [];
|
||||
private selectedBodyPartType?: CustomWokaBodyPart;
|
||||
|
||||
|
@ -149,7 +149,6 @@ export class SelectCharacterScene extends AbstractCharacterScene {
|
||||
}
|
||||
|
||||
createCurrentPlayer(): void {
|
||||
console.log("CREATE CURRENT PLAYER");
|
||||
for (let i = 0; i < this.playerModels.length; i++) {
|
||||
const playerResource = this.playerModels[i];
|
||||
//check already exist texture
|
||||
|
Loading…
Reference in New Issue
Block a user