Game Development Reference
In-Depth Information
Now we are ready to code the private void loadImageAssets(){...}
method. Once you create a method body (declaration), you will want to copy the four
Image object instantiations from your .createSplashScreenNodes() method so that all of
the Image object loading is done in one central location for your game application.
After that is done, you can copy and paste the scoresLayer Image instantiation and cre-
ate iB0 through iB8 Image instantiations. Be sure to set the image size to 81 pixels (X
and Y) and use the correct file name references, shown in the following code:
private void loadImageAssets () {
splashScreen = new Image("/invincibagelsplash.png",
640, 400, true, false, true);
instructionLayer = new Image("/
invincibagelinstruct.png", 640, 400, true, false, true);
legalLayer = new Image("/invincibagelcreds.png", 640,
400, true, false, true);
scoresLayer = new Image("/invincibagelscores.png",
640, 400, true, false, true);
iB0 = new Image("/sprite0.png", 81, 81, true, false,
true);
iB1 = new Image("/sprite1.png", 81, 81, true, false,
true);
iB2 = new Image("/sprite2.png", 81, 81, true, false,
true);
iB3 = new Image("/sprite3.png", 81, 81, true, false,
true);
iB4 = new Image("/sprite4.png", 81, 81, true, false,
true);
iB5 = new Image("/sprite5.png", 81, 81, true, false,
true);
iB6 = new Image("/sprite6.png", 81, 81, true, false,
true);
iB7 = new Image("/sprite7.png", 81, 81, true, false,
true);
iB8 = new Image("/sprite8.png", 81, 81, true, false,
true);
}
Search WWH ::




Custom Search