public void keyPressed(KeyEvent key) {

            player.keyPressed(key); //movement  & upgrades
            //System.out.println(key.getKeyCode());
            //int x = player.getX();
            //int y = player.getY();

            if (inGame) //create weapon
            {
                if (key.isShiftDown()) {
                    if (!player_weapon.isVisible())//only one var, so makes sure weapon is not overwritten midflight
                        player_weapon = player.fireWeapon(1);
                }
                else if(key.getKeyCode() == KeyEvent.VK_1 && player.hasMissiles()){
                    if(!player_weapon.isVisible())
                        player_weapon = player.fireWeapon(2);
                }
                else if(key.getKeyCode() == KeyEvent.VK_2 && player.hasPlasmaLance()){
                    if(!player_weapon.isVisible())
                        player_weapon = player.fireWeapon(3);
                }
            }
        }