0

I have this statement in my Draw method:

public void DrawSprites(GameTime gameTime)
{
    spriteBatch.Begin(SpriteSortMode.FrontToBack, BlendState.AlphaBlend);

    if (shieldPowerUp == false) 
        // Draws the Original ship
        player.Draw(gameTime, spriteBatch); 
    if (playerIsHit == true) 
        // method Draws a blinking ship for a second
        PlayerIsHit(gameTime, spriteBatch);                
    if (shieldPowerUp == true)                
        // Draws a ship with a Shield for 5 seconds
        playerShield.Draw(gameTime, spriteBatch); 
    // the rest of the method is left out
}

My problem now is that when a new Ship is drawn it Draws over the top of the prevoius one.

I dont know how to remove the original ship object for a short time while the blinking or shielded Ship object is Drawn. Do you guys have any ideas for how I can proceed ?

pinckerman
  • 4,115
  • 6
  • 33
  • 42
xoxo_tw
  • 269
  • 1
  • 7
  • 20

1 Answers1

0

It solved, the problem was in my Sprites Image file, not in my code. sorry.

xoxo_tw
  • 269
  • 1
  • 7
  • 20