Coding the player's and the background's empty component classes
By coding an empty class for each player related component, it will allow us to more quickly write the code to get the game running. We can then flesh out the real/full code for each component as we proceed without the need of dipping into the same class (mainly GameObject
) multiple times.
In this chapter we will deal with the player (and his lasers) and the background. Coding the empty outlines will also allow us to code an error free GameObject
class that will hold all these components and we will be able to see how the components interact with the game engine via the GameObject
class before coding the details inside each component.
Each of the components will implement one of the ...
Get Learning Java by Building Android Games - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.