28.04.2019 Views

[JAVA][Beginning Java 8 Games Development]

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 14 ■ Setting Up the Game Environment: Creating Fixed Sprite Classes Using the Actor Superclass<br />

Creating the Prop.java Class: Extending Actor.java<br />

Open up the InvinciBagel project in NetBeans 8, and right-click on the invincibagel (package) folder that contains<br />

your .java files and select the New ➤ <strong>Java</strong> Class menu sequence. In the New <strong>Java</strong> Class dialog, shown in Figure 14-1,<br />

name the class Prop, and accept the other default settings, suggested by NetBeans, and then click on the Finish button.<br />

Figure 14-1. Right-click on the project folder and select New ➤ <strong>Java</strong> Class; using a New <strong>Java</strong> Class dialog, name it Prop<br />

Once NetBeans creates a bootstrap class, add the <strong>Java</strong> extends keyword and Actor, as shown in Figure 14-2.<br />

Figure 14-2. Add a <strong>Java</strong> extends keyword and the Actor superclass. Mouse-over the error highlighting underneath Prop<br />

300<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!