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-19. Testing the InvinciBagel character animation; showing here is the running animation using isFlipH<br />

mirror<br />

If you press an up arrow key, while (or after) you are pressing the left or right arrow key, the result, seen in<br />

Figure 13-20, is the InvinciBagel will take off and start flying in that direction, again with realistic animated movement.<br />

Figure 13-20. Testing the InvinciBagel character animation; showing here is the leap up animation, using isFlipH<br />

mirror<br />

If you press the down arrow key, while (or even after) you’re pressing the left or right arrow key, the result, seen in<br />

Figure 13-21, is the InvinciBagel will descend while preparing to land, again with realistic animated movement.<br />

296<br />

www.it-ebooks.info

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

Saved successfully!

Ooh no, something went wrong!