style change

This commit is contained in:
Lily Tsuru 2024-07-09 23:23:02 -04:00
parent 438489c43f
commit 3845f1c1a7

View file

@ -31,11 +31,9 @@ class AgentAnimationState {
}
nextFrame() {
this.char.renderFrame(this.anim.frameInfo[this.frameIndex]);
this.frameIndex++;
this.char.renderFrame(this.anim.frameInfo[this.frameIndex++]);
if(this.frameIndex >= this.anim.frameInfo.length) {
console.log("animation finished!");
this.char.animationFinished();
return;
}