Game Design Lab 9

Swinging Targets!

Today's lab will let you practice 3D math with coordinate systems and adding objects to the teapot game using inheritance, all that the same time!

Add a new GameObject type, SwingTarget. This should inherit from Target. It will add 4 properties: ShiftTarget will require its own constructor to initialize base_x and base_y. These can be initialized to the given x and y position, since these will change. Methods: If you want a "peaceful" target for testing, just set its shoots_back property to false.

Extra Credit:

For 30% extra credit on this lab (a lot!), make the target capable of swinging in planes other than xy. The user should be able to define the plane for swinging. Collision detection must continue to function correctly.