I have three animations playing simulatenously
- a player
- a helmet
- a dagger
It seems like the player ends last (you can see the flicker in the gif I posted)
if (this.equipped.weapon) {
this.weaponAnimation.attacking.gotoAndPlay(0);
}
if (this.equipped.helmet) {
this.helmetAnimation.attacking.gotoAndPlay(0);
}
this.baseAnimation.attacking.gotoAndPlay(0);
my code for making the animation visible is currently extremely naive but shouldn't be an issue
every update call it checks the state and depending on the state it will display the animation (so they should all stop at the same time):
if (this.unitState.currentState === 'attacking') {
this.baseAnimation.attacking.visible = true;
this.weaponAnimation.attacking.visible = true;
this.helmetAnimation.attacking.visible = true;
}
each animation is the same amount of frames with the same animationSpeed.
Why is there this flicker! Also the sprite sheet is tiny and I use scaling.
Help!