@Override
    public void keyPressed(KeyEvent keyEvent) {
        if(keyEvent.getKeyCode() == KeyEvent.VK_LEFT) {
            iDireccion = 1;
        }
        if(keyEvent.getKeyCode() == KeyEvent.VK_RIGHT) {
            iDireccion = 2;
        }
        if (iDireccionProyectil == 0 && 
            keyEvent.getKeyCode() == KeyEvent.VK_SPACE){
            iDireccionProyectil = 1;
        }
    }