fixed bug with animation not showing up to date state of the outfit

This commit is contained in:
Piotr 'pwh' Hanusiak
2022-03-17 15:49:05 +01:00
parent a3fcf2dc3f
commit 744c15920b
3 changed files with 28 additions and 7 deletions
@@ -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;