Well that is basically what I have. In my AnimationListener -> animationFinished(), I have a boolean that goes true when finished.
Then in my game update I check for that boolean, if true i set player.speed = 0
After that I call player.update().
What i get with this is the animation stops at the first frame, not the last frame. What is this line (player.time = player.getAnimation()) supposed to do?
Thanks for the help.
EDIT:
Ok, I understand the player.setTime now and its working Thank you very much. Still I dont understand something. My animation time is 782. If I set the player.setTime(782) or player.setTime(player.getTime) I get the first frame. If I set the time to 781 it works great. Looking at the animation itself in spriter, at the 782 time I have the correct last frame. Does the spriter count maybe start from 1 and in libgdx it goes from 0?