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