Skip to content

Commit

Permalink
Fix the first animation frame being skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
steffen-wilke committed Jan 13, 2021
1 parent 33d588b commit 21a7171
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,15 @@ public void start() {
return;
}

this.currentFrame = this.firstFrame;
this.restart();
}

/**
* Restarts this animation at its first frame.
*/
public void restart() {
this.currentFrame = this.firstFrame;
this.lastFrameUpdate = Game.loop().getTicks();
}

@Override
Expand Down

0 comments on commit 21a7171

Please sign in to comment.