28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 7 ■ The Foundation of Game Play Loop: The <strong>Java</strong>FX Pulse System and the Game Processing Architecture<br />

Figure 7-14. Call a .start() method off the gamePlayLoop object to start GamePlayLoop AnimationTimer<br />

As you can see, the method call is in place, and the <strong>Java</strong> code is error free, as NetBeans can now find the .start()<br />

method in the GamePlayLoop class. Next, let’s use the Run ➤ Project sequence and test a pulse or two to determine<br />

what will happen now that the GamePlayLoop AnimationTimer subclass has been activated using the .start() method<br />

call. It will be interesting to see what throwing an error inside the .handle() method will do!<br />

As Figure 7-15 demonstrates, you are getting repeated errors related to the content in the .handle() method.<br />

156<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!