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 />

Figure 14-14. A completed PropH() constructor method creates a fixed PropH object flipped along the horizontal X axis<br />

Next, perform the same work process that you did for the PropH class and create a PropV class that sets the<br />

isFlipV property to true, and implements the spriteFrame.setScaleY(-1); method call, as shown in Figure 14-15.<br />

Figure 14-15. A completed PropV() constructor method creates a fixed PropV object flipped along the vertical Y axis<br />

308<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!