src/gameplayer/controller/Controller.java
private void assignKeyInputs(Scene gameScene) {
        gameScene.setOnKeyPressed(e -> {
            if (e.getCode() == KeyCode.ESCAPE) {
                pauseMenu.show(myStage);
            } else if (e.getCode() == KeyCode.H) {
                gameOver();
            } else {
                {
                    InputHandler.addCode(e.getCode());
                }
            }
        });
        gameScene.setOnKeyReleased(e -> {
            if (e.getCode() != KeyCode.ESCAPE) {
                InputHandler.removeCode(e.getCode());
            }
        });
    }
/**
     * Passes keys to engine and assigns escape key to pause menu
     */
Passes keys to engine and assigns escape key to pause menu
Passes keys to engine and assigns escape key to pause menu
private void assignKeyInputs(Scene gameScene) {
        gameScene.setOnKeyPressed(e -> {
            if (e.getCode() == KeyCode.ESCAPE) {
                pauseMenu.show(myStage);
            } else if (e.getCode() == KeyCode.H) {
                gameOver();
            } else {
                {
                    InputHandler.addCode(e.getCode());
                }
            }
        });
        gameScene.setOnKeyReleased(e -> {
            if (e.getCode() != KeyCode.ESCAPE) {
                InputHandler.removeCode(e.getCode());
            }
        });
    }
private void assignKeyInputs ( Scene gameScene ) { gameScene . setOnKeyPressed ( e -> { if ( e . getCode ( ) == KeyCode . ESCAPE ) { pauseMenu . show ( myStage ) ; } else if ( e . getCode ( ) == KeyCode . H ) { gameOver ( ) ; } else { { InputHandler . addCode ( e . getCode ( ) ) ; } } } ) ; gameScene . setOnKeyReleased ( e -> { if ( e . getCode ( ) != KeyCode . ESCAPE ) { InputHandler . removeCode ( e . getCode ( ) ) ; } } ) ; }
Passes keys to engine and assigns escape key to pause menu
Passes keys to engine and assigns escape key to pause menu