Made the game detect when a collision happens.