示例#1
0
文件: Form1.cs 项目: sador23/PingPong
 void t_Tick(object sender, EventArgs e)
 {
     score.Text = this.player.GetScore().ToString();
     if (!isStopped)
     {
         this.ball.move();
         if (ball.IsOutOfGame())
         {
             Program.FlipIsLost();
             this.Close();
         }
         this.ball.CheckCollide(progressBar1, player);
         if (ball.GetCurrent() == ball.GetDiff())
         {
             this.Close();
         }
         Invalidate();
     }
 }