Pro Java 9 Games Development Leveraging the JavaFX APIs

(Michael S) #1
Chapter 22 ■ SCoring engine: Creating the SCore Ui LayoUt and SCoring the Content

Copy the method from the bottom of your class to right after the createQAnodes() method, as shown
at the bottom of Figure 22-5. Copy the qaLayout statements from the createQAnodes() method into the
createScoreNodes() method and change the .setTranslateX() method call from -250 to 250 to mirror it to
the other corner of the display.


Figure 22-4. Create a createScoreNodes() method after the qaLayout logic and use Alt+Enter to have
NetBeans code it


Figure 22-5. Add a StackPane named scoreLayout at the top of the class and instantiate and configure it like
qaLayout

Free download pdf