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 11 ■ Moving Your Action Figure in 2D: Controlling the X and Y Display Screen Coordinates<br />

Figure 11-15. Use Run ➤ Project to start the game and click the PLAY GAME Button<br />

Next, let’s test your ActionEvent handling, and later, the KeyEvent handling, by clicking on the PLAY GAME<br />

Button control object. This should hide the splashScreenBackplate and splashScreenTextArea ImageView objects, and<br />

reveal the white background color which is set for the Scene object named scene using the Color.WHITE constant.<br />

As you can see, on the left half of Figure 11-16, this is indeed the case, and our InvinciBagel character is on the<br />

screen, and we are ready to test the KeyEvent handling that we put into place in Chapter 9, and see if we can get the<br />

InvinciBagel (iBagel Bagel object) character to move around on the screen. This is starting to get more and more<br />

exciting with each successive chapter that we finish!<br />

www.it-ebooks.info<br />

247

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

Saved successfully!

Ooh no, something went wrong!