コード例 #1
0
        private void Update(Object myObject, EventArgs eventArgs)
        {
            MoveSnake();
            EatBird();
            Border();
            EatBird_2();
            EatBird_3();
            int i = score;

            EatSkull();
            if (i >= 150)
            {
                label3.Visible = true;
                label4.Visible = true;
                Yess.Visible   = true;
                No.Visible     = true;
                timer.Stop();
                AddBird_2.Stop();
                DeleteBird_2.Stop();
                AddBird_3.Stop();
                DeleteBird_3.Stop();
                AddSkull.Stop();
                label2.Visible = true;
            }
        }
コード例 #2
0
 private void EatSkull()
 {
     if (snake[0].Location.X == rP && snake[0].Location.Y == rQ)
     {
         for (int _i = 1; _i <= score; _i++)
         {
             this.Controls.Remove(snake[_i]);
         }
         score           = 0;
         labelScore.Text = "Score: " + score;
         timer.Stop();
         AddBird_2.Stop();
         DeleteBird_2.Stop();
         AddBird_3.Stop();
         DeleteBird_3.Stop();
         AddSkull.Stop();
         label1.Visible = true;
         label2.Visible = true;
         Yess.Visible   = true;
         No.Visible     = true;
         this.Controls.Remove(skull);
         rP = 700;
         rQ = 600;
     }
 }