all I want to do is clear a image after I have drawn it, I am able to shoot a bullet and have it hit a bug and draw a collision image then I want to clear the collision image, I know this a simple problem but I just cant seem to figure it out, thanks for all the help everyone. here is my latest code, I am so close to solving my problem. also please close my previous thread I was told to post a new thread.
bool draw_flag_coll = true;
int count = 10;
private void Form1_Paint(object sender, PaintEventArgs e)
{
e.Graphics.Clear(Color.Black);
e.Graphics.DrawImage(ship, 350 + x, 530);
e.Graphics.DrawImage(bullet, 375 + x, 520 + y);
e.Graphics.DrawImage(bug_one, 350, 0);
if (y <= -510 && x >= -15 && x <= 15)
{
e.Graphics.DrawImage(coll, 350, 0);
if (count <= 0)
{
draw_flag_coll = false;
}
}
}
private void timer1_Tick(object sender, EventArgs e)
{
y -= 5;
Invalidate();
}
private void timer2_Tick(object sender, EventArgs e)
{
count--;
Invalidate();
}
}