Game Development Reference
In-Depth Information
Figure 10-11
.
Use Alt-Enter, and have NetBeans write your CastingDirector() constructor method Java code for you
We should probably create at least one Actor class (object) for our game's star char-
acter, the InvinciBagel himself, before we close out this chapter. Let's use our Hero ab-
stract class to create a Bagel class so that later we can create an iBagel object. We will
use this code in the next chapter, where we will learn how to move this InvinciBagel
character around the Stage, as well as optimizing the structure of our InvinciBagel.java
class a bit more as well.
Creating Our Main Actor: The Bagel
Hero Subclass
Let's create a
Bagel.java
class by right-clicking on the
invincibagel
package folder in
the NetBeans Projects pane on the left side of the IDE, and select the
New Java
Class
menu sequence to bring up the
New Java Class
dialog, shown in
Figure 10-12
.