CS 290 Introduction to Game Development - Lab 4
- Create an image for a new manhole sprite (basically, just a black
circle).
- 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.
- 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.
- 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.