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 13 ■ Animating Your Action Figure States: Setting the Image States Based on KeyEvent Processing<br />

Figure 13-15. Use the Source ➤ Insert Code ➤ Generate ➤ Getter and Setter sequence and select aKey, dKey,<br />

sKey, wKey<br />

As you can see in Figure 13-16, NetBeans has created all eight of our getter and setter methods for the new<br />

KeyEvent processing variables that we have added to the InvinciBagel.java class. The code is error-free, and we are<br />

ready to go back into the Bagel.java class, and utilize some of these new method calls to implement jump and evade.<br />

292<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!