Jump to content
  • Advertisement
Sign in to follow this  
povilaslt2

XNA Frame animation problem

This topic is 2214 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Please include some more detail about your problem to be clear

However, I will attempt to help at this point based on what I think is happening
If your sprite normally moves around by player input or AI or something like that, all you would have to do is: add a isPlayingAnimation variable to your code an relate it to your sprite somehow; add a statement to the code that begins an animation to set that variable to true; and include a condition in its movement code that checks whether it is playing an animation, and doesn't execute movement if it is

Another thing that occurred to me is that your is constantly on an animation loop, and you want to stop it during a certain part of that animation; in that case, you would add a counter to its movement code that increments every frame, is reset when the animation restarts, and then a condition to the code that prevents movement when the counter is in a certain range

Hopefully you will find at least some of that helpful

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!