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

The Java code for this simple modification is shown highlighted in the middle of Figure 22-2 and should
look like the following Java 9 statement, now found in the first part of your public void start() core JavaFX 9
method:


public void start() {
loadImageAssets();
loadAudioAssets();
createSpecialEffects();
createTextAssets();
createMaterials();
createBoardGameNodes();
createUInodes();
createQAnodes();
qaLayout.setVisible(false);
createSceneProcessing();
createGameBoardNodes();
...
}


Figure 22-2. Remove the .setVisible() call from your gameButton handler and place it in .start() after
createQAnodes()

Free download pdf