XNA Creators Club Online
Page 1 of 1 (10 items)
Sort Posts: Previous Next

Pausing Problems![Solved]

Last post 4/23/2009 4:24 AM by TheRealistOG. 9 replies.
  • 4/23/2009 3:21 AM

    Pausing Problems![Solved]

    Nevermind guys, I solved it on my own.
    Thanks for the help anyway though!
  • 4/23/2009 3:34 AM In reply to

    Re: Pausing Problems!

    well, that's possibly because you never tell it to stop playing the animation.  
    Maybe set up an else if or just an else statement to reset the animation to something else.
  • 4/23/2009 3:37 AM In reply to

    Re: Pausing Problems!

    TheRealistOG:
    but when I pause and then unpause the game the player stays stuck in the idle animation

    Because you're not setting the animation to anything else that I can see.
    Jim Perry - Microsoft XNA MVP
    If people spent a minute searching the forums and reading the FAQs before posting I'd be out of a job.
      Got some XNA Game Studio/XNA Framework development info to share with the community? Put it on the XNA Wiki.
        Please mark posts as Answers or Good Feedback when appropriate.
  • 4/23/2009 3:44 AM In reply to

    Re: Pausing Problems!

    Jim Perry:
    TheRealistOG:
    but when I pause and then unpause the game the player stays stuck in the idle animation

    Because you're not setting the animation to anything else that I can see.
    How do I tell it in an else statement when all the animations for the player depends on player input? Unlike enemy I can't just say else: runAnimation.
    Is there a way to fix this?
  • 4/23/2009 3:50 AM In reply to

    Re: Pausing Problems!

    To enable pausing in my games, I've always preferred a much simpler method: stop calling Update on everything. For GameComponents, you can set their Enabled properties to false. If you are otherwise manually calling your objects' Update methods, then just don't call them when your game is paused. Much simpler, and as long as you always rely on the GameTime parameter to perform updates in your Update methods, and you aren't doing any updating in your Draw methods, it should work flawlessly.
    Previously known as "Rainault".
    Twitter - me, Jade Vault Games
    Announcing ASCII Quest, a Roguelike under development for Xbox LIVE Indie Games
  • 4/23/2009 3:59 AM In reply to

    Re: Pausing Problems!

    couldn't you just add a resetAnimation to your animations list, and all that 'animation' does is display the normal sprite whenever you're not moving?
  • 4/23/2009 4:05 AM In reply to

    Re: Pausing Problems!

    Joe:
    couldn't you just add a resetAnimation to your animations list, and all that 'animation' does is display the normal sprite whenever you're not moving?

    could you explan a little more?
  • 4/23/2009 4:15 AM In reply to

    Re: Pausing Problems!

    Nevermind, I solved it on my own.
  • 4/23/2009 4:18 AM In reply to

    Re: Pausing Problems!

    So what exactly did you do to fix it?  Did you use a reset method, or did you do something completely different?
  • 4/23/2009 4:24 AM In reply to

    Re: Pausing Problems!

    Joe:
    So what exactly did you do to fix it?  Did you use a reset method, or did you do something completely different?
    I had to make the values change from true or false when the player unpaused the game. Stupid mistake on my part.
Page 1 of 1 (10 items) Previous Next