src/KeyInput.java
/**
     * Method to handle events when a key is released
     * @param e KeyEvent reference
     */
Method to handle events when a key is released
@param e KeyEvent reference
Method to handle events when a key is released @param e KeyEvent reference
public void keyReleased(KeyEvent e){
        int key = e.getKeyCode();
        Player p = Game.player;
        if(key == KeyEvent.VK_S && Game.level == 3 && Game.gameState.equals("game")){
            p.toggleSleep();
        }
        if(key == KeyEvent.VK_LEFT) {
            if(!rightPressed) p.setVelX(0);
            leftPressed = false;
            keysDown.remove(KeyEvent.VK_LEFT);
        }else if(key == KeyEvent.VK_RIGHT){
            if(!leftPressed) p.setVelX(0);
            rightPressed = false;
            keysDown.remove(KeyEvent.VK_RIGHT);
        }else if(key == KeyEvent.VK_SPACE || key == KeyEvent.VK_UP) {
            keysDown.remove(KeyEvent.VK_SPACE);
            keysDown.remove(KeyEvent.VK_UP);
        }
        if(key == KeyEvent.VK_O){
            Game.gameState = "endscreen";
            Game.player.reset();
        }
        if(key == KeyEvent.VK_L){
           keysDown.remove(KeyEvent.VK_L);
        }
        if(key == KeyEvent.VK_M){
            Game.motionBlur = !Game.motionBlur;
        }
    }
public void keyReleased ( KeyEvent e ) { int key = e . getKeyCode ( ) ; Player p = Game . player ; if ( key == KeyEvent . VK_S && Game . level == 3 && Game . gameState . equals ( "game" ) ) { p . toggleSleep ( ) ; } if ( key == KeyEvent . VK_LEFT ) { if ( ! rightPressed ) p . setVelX ( 0 ) ; leftPressed = false ; keysDown . remove ( KeyEvent . VK_LEFT ) ; } else if ( key == KeyEvent . VK_RIGHT ) { if ( ! leftPressed ) p . setVelX ( 0 ) ; rightPressed = false ; keysDown . remove ( KeyEvent . VK_RIGHT ) ; } else if ( key == KeyEvent . VK_SPACE || key == KeyEvent . VK_UP ) { keysDown . remove ( KeyEvent . VK_SPACE ) ; keysDown . remove ( KeyEvent . VK_UP ) ; } if ( key == KeyEvent . VK_O ) { Game . gameState = "endscreen" ; Game . player . reset ( ) ; } if ( key == KeyEvent . VK_L ) { keysDown . remove ( KeyEvent . VK_L ) ; } if ( key == KeyEvent . VK_M ) { Game . motionBlur = ! Game . motionBlur ; } }
Method to handle events when a key is released
 @param e KeyEvent reference
Method to handle events when a key is released @param e KeyEvent reference
//Camera Debugging
