CS 290 Introduction to Game Development - Lab 4

  1. Create an image for a new manhole sprite (basically, just a black circle).
  2. In the start() method, create two or more manhole sprites using the image you created. Set the positions of the sprites so that they appear in the lanes of the road.
  3. In the draw() method, add code to draw the manhole sprites. Draw images/sprites in the following order: background, manholes, chicken and cars. This will guarantee that the manholes appear underneath the cars.
  4. In the update() method, add a condition to check whether the chicken has collided with any of the manholes. If so, the chicken loses a life, just as if the chicken was hit by a car.