Game Development Reference
In-Depth Information
Set and HashSet objects do not have a specific order, and cannot have duplicate ele-
ments.
Next we created your CastingDirector.java class, to manage the Actor objects that
will need to be added to the game and removed from the game. This class will also
maintain the List<Actor> structure that will be used for the collision detection logic
that we will be adding later on during the topic in Chapter 16 .
Finally, we created our first Actor related class, the Bagel class, which extends the
Hero superclass and will allow us to put the primary InvinciBagel Actor object charac-
ter into our game Scene and onto the Stage. We created the Bagel() constructor method
and used the @Override keyword to override the .update() and .collide() methods, so
that we have someplace to construct our programming logic relating to this character
during the rest of the topic.
In the next chapter, we're going to take a look at how to move the game sprite
around the screen using this KeyEvent event handling structure that we have created
during this chapter, as well as how to ascertain the boundary (edges) of the screen,
character direction, movement velocity, and related animation and movement consider-
ations.
Search WWH ::




Custom Search