Game Development Reference
In-Depth Information
instructionLayer = new Image("/invincibagelinstruct.png",
640, 400, true, false, true);
splashScreenTextArea = new ImageView();
splashScreenTextArea.setImage(instructionLayer); // this
Java statement connects the two objects
As Figure 6-7 demonstrates, your Scene Graph node creation (seen at the top of the
InvinciBagel class) and the Node object instantiation and configuration (seen in the
createSplashScreenNodes() method) are in place and error free. You still need to add in
the Image objects for the other two screens, but there is enough code here to be able to
add these Node objects to the Scene Graph, using the addNodesToStackPane() meth-
od, and then test the code to make sure that it is working. According to the NetBeans
IDE, this code is error free!
Figure 6-7 . Coding the createSplashScreenNodes() method; instantiating and configuring the nodes in the Scene
Graph
 
 
Search WWH ::




Custom Search