Jump to content

Jaka

Members
  • Posts

    2
  • Joined

  • Last visited

Jaka's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 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?
  2. I need some help with playing the animations. I would like to stop one animation at the last frame, and i cant figure it out how. Using the listener and stopping the animation after "animation finished" flag triggers, returns the first frame of animations. Or even setting the playback of the animation to 1time and not looping would be ok. I am working with libgdx. Thank you for the help Jaka
×
×
  • Create New...