fixed bug with animation not showing up to date state of the outfit
This commit is contained in:
@@ -79,6 +79,7 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
public updateSprite(textureKey: string, bodyPart: CustomWokaBodyPart): void {
|
||||
this.sprites[bodyPart].anims.stop();
|
||||
this.sprites[bodyPart].setTexture(textureKey).setVisible(textureKey !== "");
|
||||
if (textureKey === "") {
|
||||
return;
|
||||
|
||||
@@ -28,8 +28,8 @@ export class WokaBodyPartSlot extends GridItem {
|
||||
|
||||
public readonly SIZE: number = 50;
|
||||
|
||||
constructor(scene: Phaser.Scene, x: number, y: number, config: WokaBodyPartSlotConfig) {
|
||||
super(scene, undefined, { x, y });
|
||||
constructor(scene: Phaser.Scene, x: number, y: number, config: WokaBodyPartSlotConfig, id?: number) {
|
||||
super(scene, `${id}`, { x, y });
|
||||
|
||||
this.config = config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user