public void update(){
		
		if(shooting || jumpShooting){
			
			if(!audioPlayed){
			audio = new JukeBox("scifi003.mp3");
			audio.play();
			audioPlayed = true;
			}
		}
		if(!shooting && !jumpShooting){
			audioPlayed = false;
		}
		
		
		if(!bottomMapCollision &&!jumping && !jetpack){
			falling = true;
		}
		
		if (!left && !right && !falling && !jumping && !shooting && !jumpShooting && !jetpack){
			setIdling(true);
		}
		else{
			setIdling(false);
		}
		
		if(jumping && !jetpack){
			jumpTimer++;
			
			if(jumpTimer == 1){
				audio = new JukeBox("jump_09.wav");
				audio.play();
			}
			walking = false;
			idling = false;
			dy = -3;
		
			if(right && facingRight && !rightMapCollision){
				dx = 2;
			}
			if(left && !facingRight && !leftMapCollision){
				dx = -2;
			}
			if(jumpTimer == 20){
				falling = true;
				jumping = false;
				grounded = false;
				bottomMapCollision = false;
				jumpTimer = 0;
			}
		
			
			if(!shooting){
				jumpShooting = false;
			}
						
		}
		
		if(falling && !jetpack){
			walking = false;
			jumping = false;
			topMapCollision = false;
			if(bottomMapCollision){
				dy = 0;
				falling = false;
				grounded = true;
			}
			if(!grounded) {
				
				dy = 3;
				jumping = false;
				if(right && facingRight && !rightMapCollision){
					dx = 2;
				}
				if(left && !facingRight && !leftMapCollision){
					dx = -2;
				}
			}
			
			if(!shooting){
				jumpShooting = false;
			}
		}
		
		if(left && (!falling && !jumping && !jetpack)){
			grounded = true;
			inAir = false;
			right = false;
			facingRight = false;
			walking = true;
			idling = false;
			jumpShooting = false;
			if(leftMapCollision){
				dx = 0;
				leftMapCollision = rightMapCollision = false;
			}
			else if(!leftMapCollision){
				dx = -2;
				
			}
		}
		
		if(right && (!falling && !jumping && !jetpack)){
			grounded = true;
			inAir = false;
			left = false;
			facingRight = true;
			walking = true;
			idling = false;
			jumpShooting = false;
			if(rightMapCollision){
				dx = 0;
				leftMapCollision = rightMapCollision = false;
			}
			else if(!rightMapCollision){
				dx = 2;
			}
		}
		
		
		
		if(!right && !left){
			walking = false;
		}
		
		if (!walking && !falling && !jumping &&!shooting && !jumpShooting && !jetpack){
			setIdling(true);
			
		}
		
		if(!leftMapCollision && !rightMapCollision && !topMapCollision && !bottomMapCollision && !jetpack){
			falling = true;
		}			
		
		if(idling){	
			dx = dy = 0;
		}
		
		if((jumping || falling) && shooting){
			jumpShooting = true;
		}
		if(!(jumping || falling) && shooting){
			jumpShooting = false;
		}
		
		// TODO still a bunch of issues
		if (jetpack) {
			walking = idling = jumping = falling = shooting = jumpShooting = grounded = false;
			jetTimer++;
			if (jetTimer <= 20) {
				dy = -3 * jetTimer * jetTimer / (20 * 20); // exponential
															// jetpack
			} else {
				dy = -3;
			}

			if(right){
				facingRight = true;
			}
			if(left){
				facingRight = false;
			}

			if (right && !rightMapCollision) {
				facingRight = true;
				dx = 2;
			}
			if (left && !leftMapCollision) {
				facingRight = false;
				dx = -2;
			}
			
		}

		
		if(!bottomMapCollision &&!jumping && !jetpack){
			falling = true;
		}
		
		if(topMapCollision && (dy != 0)){
			dy = 0;
		}

		if (facingRight && (dx < 0)) {
			dx = 0;
		}
		if (!facingRight && (dx > 0)) {
			dx = 0;
		}
		
		if(leftMapCollision && (dx < 0)){
			dx = 0;
		}
		
		if(rightMapCollision && (dx > 0)){
			dx = 0;
		}
		
		if(bottomMapCollision && !(jumping || jetpack)){
			dy = 0;
		}
		
		if(leftMapCollision){
			if(left || dx < 0){
				dx = 0;
			}else{
				leftMapCollision = false;
			}
		}
		if(rightMapCollision){
			if(right || dx > 0){
				dx = 0;
			}else{
				rightMapCollision = false;
			}
		}
		
		// keep bottom of update function
		movementUpdate();

	}