Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 18 ■ 3D Gameplay DesiGn: CreatinG your Game Content usinG Gimp anD Java

Figure 18-10. Set the diffuse21 Image object to temporarily reference the gamequad1bird1.png texture map
you created


Now all we need to do is to test the new code to see how the game board looks when it lands on the
Animal (orange) quadrant when the 3D spinner randomly selected this game board quadrant (topic) for the
player to answer.
This might take a number of spin attempts as the Random class’s random object (random number
generator engine) is actually quite effective at providing a random game board quadrant result on each
subsequent spin of your 3D spinner.
Use a Run ➤ Project work process to spin the spinner until quadrant 1 is selected, as shown in
Figure 18-11.

Free download pdf