Im struggling on modify the animated Sprite if you change textures for the first time it does work correctly but the next change will not update textures so stick on the same animation.
const TEXTURES = []; //list of animated Sprite generate
class Avatar{
constructor(ressources){
this.spawnUnSpawn; //Animation
}
Spawn(){
this.spawnUnSpawn.animation.textures = TEXTURES.spawn.textures;
this.spawnUnSpawn.animation.gotoAndPlay(0);
}
UnSpawn(){
this.spawnUnSpawn.animation.textures = TEXTURES.unspawn.textures;
this.spawnUnSpawn.animation.gotoAndPlay(0);
}
}