- Create a list (e.g., std::vector) of abstract GameObjects that the Game class manages and executes. A game object should call both update() and render() using this list. Redesign the existing GameObject class to be abstract as discussed in class.
When the list is deleted it should delete all of its contained GameObjects (hint: store std::unique_ptr<>() to manage a concrete GameObjects lifetimes).
- Create 3 concrete subclasses of the abstract GameObject to represent a Tank, Chopper and Pacman. Each of these subclasses should (upon creation) load the image associated with it (Tank -> tank-big-down.png, Chopper -> choppersingle.png and Pacman -> pacman_32x32.png) which is stored in the assets/images folder.
Reviews
There are no reviews yet.