I'm building a Flappy Bird game in C#. So far, the code works perfectly, however I added a GIF saying Game Over, and this image only shows once timer1
is stopped.
How can I achieve that?
Below is the code snippet for the GIF image (I tried both snippets of code, and they didn't work though there was no error):
private void pictureBox5_Click(object sender, EventArgs e)
{
if (timer2.Enabled)
{
pictureBox5.Show();
}
else
{
pictureBox5.Hide();
}
}
And here's the code snippet for timer2
private void timer2_Tick(object sender, EventArgs e)
{
if (!timer1.Enabled)
{
timer2.Enabled = true;
timer2.Start();
}
}