Can someone help me with hiding/removing a sprite that was drawn before? I cant seem to find what im looking for by searching through the internet.
XNA sprite hiding/removing
Page 1 of 13 Replies - 1546 Views - Last Post: 18 October 2012 - 01:45 PM
Replies To: XNA sprite hiding/removing
#2
Re: XNA sprite hiding/removing
Posted 17 October 2012 - 07:47 PM
*** Moved to XNA ***
#3
Re: XNA sprite hiding/removing
Posted 18 October 2012 - 12:32 AM
If you drew a sprite using SpriteBatch.Draw();, then check where you call that method. If in the Game1.cs Draw() method, it will keep refreshing. What you need is some kind of boolean check, like if(enemy.IsAlive) spriteBatch.Draw(enemy.Sprite); otherwise it will always be drawn.
#4
Re: XNA sprite hiding/removing
Posted 18 October 2012 - 01:45 PM
MrShoes, on 18 October 2012 - 12:32 AM, said:
If you drew a sprite using SpriteBatch.Draw();, then check where you call that method. If in the Game1.cs Draw() method, it will keep refreshing. What you need is some kind of boolean check, like if(enemy.IsAlive) spriteBatch.Draw(enemy.Sprite); otherwise it will always be drawn.
Thanks for the help!
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote







|