Esempio n. 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (button2.Text == "Stop (P)")
     {
         button2.Text = "Continue";
         HeadMove.Stop();
         Eat.Stop();
         BodyMove.Stop();
     }
     else
     {
         button2.Text = "Stop (P)";
         HeadMove.Start();
         Eat.Start();
         BodyMove.Start();
     }
 }
Esempio n. 2
0
 void startgame()
 {
     R     = true;
     L     = false;
     D     = false;
     U     = false;
     score = 0;
     load();
     obstacle = new Obstacle();
     obstacle.taovatcan(panel1, tuong);
     HeadMove.Start();
     Eat.Start();
     BodyMove.Start();
     food = new FoodforAdvanced();
     food.TaoThucAn(panel1, listthucan);
     Panel.Start();
 }