Example #1
0
        private void PB_Car_Move(object sender, EventArgs e)
        {
            PictureBox PB_Car = sender as PictureBox;

            if (CheckCollide(PB_MyCar, PB_Car))
            {
                TimerCars.Stop();
                TimerCoins.Stop();
                TimerRoadMarkings.Stop();

                if (MessageBox.Show(String.Format("Số ô tô đã tránh: {0}\nĐiểm: {1}", TB_TheNumberOfVehiclesDoesNotCollide.Text, TB_Scores.Text), "Game Over!", MessageBoxButtons.OK, MessageBoxIcon.Information) == DialogResult.OK)
                {
                    ResetGame();
                }
            }
        }
Example #2
0
 private void BT_Start_Click(object sender, EventArgs e)
 {
     TimerRoadMarkings.Start();
     TimerCars.Start();
     TimerCoins.Start();
 }