Game Development Reference
In-Depth Information
Figure 9-2 . Use a .setVisible() method for the ImageView class to hide background image plates and reveal White
color
As you can see, there is also a wavy yellow warning highlight under the
EventHandler<ActionEvent> part of this event handling structure which relates to Java
lambda expressions. After we finish implementing all of the final UI design code for
the Buttons that controls what is visible to the player, and which imagery it is showing
them, I will get into lambda expressions, and we will get rid of these warning messages
in your code as well. After that, we'll move on to implement arrow key event handling
structures, so that the user can navigate the InvinciBagel around the screen.
First, let's test the code that we put into the previously empty PLAY GAME Button
event handling structure.
Testing the Game Play Button: Making Sure Your
Code Works
Use the Run Project (or the Run icon at the top of the IDE that looks like a video
play transport button) to launch your InvinciBagel game and click on the PLAY
GAME Button on the bottom left of the window. As you can see in Figure 9-3 , the
 
 
Search WWH ::




Custom Search