Game Development Reference
In-Depth Information
ject, and a castDirector CastingDirector object, using classes that we created in Chapter
10 . We wired up our GamePlayLoop object and one of our Actor objects (an iBagel
Bagel object) by using the JavaFX pulse engine .handle() method in the
GamePlayLoop.java class and the .update() method in the Bagel.java class. Now the
time has come to use our Run Project work process and make sure that all of the
Java code that we have put into place during this chapter does what it is supposed to
do: that is, what we think that it should do. After all, that is what the programming
practice is all about: writing code that we think will do something, running it to see if it
does, and then debugging it to find out why it is not working, if in fact it is not. Once
you click on the Play button at the top of the NetBeans IDE and invoke the Run
Project process, the code will compile and the InvinciBagel game window seen in Fig-
ure 11-15 will open up on your desktop. The first thing that you should notice is that
the InvinciBagel sprite is nowhere to be seen, since we added it to the root StackPane
object first instead of last, and so the splashscreen and game user interface design is
still working as intended.
Figure 11-15 . Use Run
Project to start the game and click the PLAY GAME Button
 
 
Search WWH ::




Custom Search