Game Development Reference
In-Depth Information
Now that we've declared the object variables that we will need to implement the
InvinciBagel Actor object instantiation in the .createGameActors() method and Cast-
ingDirection engine in the createCastingDirection() method, let's move on to creating
the first of our new methods, the .loadImageAssets() method, which will contain all of
your Image object instantiation calls to the Image() constructor. We will put all Image
object instantiations in this method.
The Actor Image Assets Loading Method:
.loadImageAssets()
Now that we have declared the nine Image objects for use at the top of our InvinciBa-
gel.java class, the next thing that we will need to do is to copy the nine PNG32 sprite
images, which are named sprite0.png through sprite8.png, into the /src folder for our
InvinciBagel NetBeans project. This is done using the file management utility for your
operating system; in the case of my 64-bit Windows 7 OS it is the Windows Explorer
utility, shown in Figure 11-4 , with the Image assets copied into the C:/Users/
user/MyDocuments/NetBeansProjects/InvinciBagel/src folder. All
of the PNG image assets are PNG32 (24-bit RGB true color data with a 8-bit 256 gray
level alpha channel) except for the back plate for the splashscreen, which is a PNG24,
as it does not need an alpha channel because it is a background image plate.
Figure 11-4 . Copy the sprite0.png through sprite8.png files into your NetBeansProjects/InvinciBagel/src project
folder
 
 
Search WWH ::




Custom Search