hey im making my first game, and have a very wierd bug in drawing
the code i use:
public void Draw()
{
spritebatch.Draw(container, position, Color.White);
spritebatch.Draw(bar,position,new Rectangle((int)position.X,(int)position.Y, currenthealth, bar.Height), Color.White);
}
if i use:
public void Draw()
{
spritebatch.Draw(container, position, Color.White);
spritebatch.Draw(bar,position, Color.White);
}
if you notice in the first picture… it draws it blurry, because if i loose health the blurry part gets smaller.
any one can tell me what am i doing wrong?
Thank you very much that solved it