public bool CheckCollision(BotCar botCar) { if (_playerCarBitmap.BitmapCollision(_x, _y, botCar.BotCarBitmap, botCar.X, botCar.Y)) { return(true); } return(false); }
public void RandomlyAddCar() { if (SplashKit.Rnd() < 0.015) { BotCar randomBotCar = RandomCar(); _botCars.ForEach(delegate(BotCar botCar) { if (botCar.CheckCollision(randomBotCar)) { randomBotCar.Y -= 600; } }); _botCars.Add(randomBotCar); } }