Beispiel #1
0
 private void EatBird()
 {
     if (snake[0].Location.X == rI && snake[0].Location.Y == rJ)
     {
         labelScore.Text = "Score: " + ++score;
         PictureBox pictureBox = new PictureBox();
         snake[score]           = pictureBox;
         snake[score].Location  = new Point(snake[score - 1].Location.X + 20 * dirtX, snake[score - 1].Location.Y - 20 * dirtY);
         snake[score].Size      = new Size(sizeOfSides, sizeOfSides);
         snake[score].BackColor = Color.Gold;
         this.Controls.Add(snake[score]);
         GenerateBird();
         AddSkull.Start();
         DeleteSkull.Start();
         AddBird_2.Start();
         DeleteBird_2.Start();
         AddBird_3.Start();
         DeleteBird_3.Start();
     }
 }