Пример #1
0
 public bool ScoreUp(Basket basket)
 {
     for (int i = balls.Count() - 1; i >= 0; i--)
     {
         if (balls[i].x >= basket.x && balls[i].x + 25 <= basket.x + 75 && balls[i].y >= 450)
         {
             Score++;
             balls.RemoveAt(i);
             return true;
         }
     }
     return false;
 }
Пример #2
0
 public void newGame()
 {
     random = new Random();
     exitGameBtn = true;
     playersScore = new List<Player>();
     newBall = 0;
     newBallInterval = 80;
     basket = new Basket();
     ballCollection = new BallCollection();
     x = 0;
     timer1.Start();
     mainSound.PlayLooping() ;
 }