Hello Guest

Author Topic: pause and continue tk2dAnimatedSprite  (Read 3809 times)

tom123

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
pause and continue tk2dAnimatedSprite
« on: July 27, 2013, 06:08:06 am »
When the user hits pause, I want all tk2dAnimatedSprites to stop, and then continue when the user hits continue.
What's the correct way to do this?
Right now I'm calling pause() on the tk2dAnimatedSprite, and then when the user hits continue, I'm calling play().

pause() works, but play() doesn't bring it back to playing.. is there anything else I need to call to get him to continue the animation?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: pause and continue tk2dAnimatedSprite
« Reply #1 on: July 27, 2013, 11:02:46 am »
Use Paused = true to pause, Paused = false to unpause.
Or Pause() and Resume().

If you want all animated sprites to pause, just use
tk2dSpriteAnimator.g_Paused = true;
to pause everything.

tom123

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: pause and continue tk2dAnimatedSprite
« Reply #2 on: July 27, 2013, 08:48:54 pm »
that worked, thanks!!
I wonder why I missed the Resume() method :/