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 14 ■ Setting Up the Game Environment: Creating Fixed Sprite Classes Using the Actor Superclass<br />

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

Copy the contents of the basic Prop class that you created in the previous section, including the package, import<br />

and super() constructor, into the PropH class, and then change Prop to PropH, as is shown in Figure 14-10.<br />

Figure 14-10. Create a PropH class structure identical to the Prop class structure, except using PropH, instead of Prop<br />

Add the <strong>Java</strong> this keyword to your PropH() constructor method on a new line under the super() constructor, and<br />

then use (type) the period key to open up the handy NetBeans method selector pop-up, as seen in Figure 14-11.<br />

www.it-ebooks.info<br />

305

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

Saved successfully!

Ooh no, something went wrong!