private void timer3_Tick(object sender, EventArgs e) { if (n > 0) { n--; } else { timer2.Stop(); timer3.Stop(); MessageBox.Show("Time Out!"); n = 90; state8 b = new state8(); b.Show(); this.Hide(); } s2.Text = n.ToString(); }
private void timer2_Tick(object sender, EventArgs e) { if (meatbox7.Bounds.IntersectsWith(gk1.Bounds)) { meatbox7.Top = 25; meatbox7.Left = 25; } else if (meatbox7.Bounds.IntersectsWith(Goal8.Bounds)) { timer1.Stop(); timer2.Stop(); timer3.Stop(); MessageBox.Show("Next state !"); n = 91; meatbox7.Top = 25; meatbox7.Left = 25; state8 a = new state8(); a.Show(); this.Hide(); } }