public void keyPressed(int key) {
        if(key == KeyEvent.VK_A || key == KeyEvent.VK_LEFT){
            player.setLeft(true);
        }
        if(key == KeyEvent.VK_D || key == KeyEvent.VK_RIGHT){
            player.setRight(true);
        }
        if(key == KeyEvent.VK_W || key == KeyEvent.VK_SPACE || key == KeyEvent.VK_UP){
            player.setJumping(true);
        }
        if(key == KeyEvent.VK_SHIFT){
            player.setSprint(true);
        }
        if(key == KeyEvent.VK_ESCAPE){
            gameStateControl.setPaused(gameStateControl.getGameState()); //this allows us to "save" the current state of the game
            gameStateControl.setGameState(LevelType.PAUSE); //Pause screen
        }
    }