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; }
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() ; }