public void update(){
		
		if(shooting){
			if(!audioPlayed){
				audio = new JukeBox("scifi003.mp3");
				audio.play();
				audioPlayed= true;
			}
		}
		if(!shooting){
			audioPlayed = false;
		}
		
		if(falling){
			y+=2;
		}
		if(bottomMapCollision){
			y+=0;
		}
		
		if(idle){
			x+=0;
			x-=0;
			y+=0;
		}
		
		if((x - player.x) > 0){
			setFacingRight(false);
			
		}
		if((x - player.x) < 0){
			setFacingRight(true);
		}
		
		if(((Math.abs(x - player.x) <= 200) && (Math.abs(y - player.y) <=20)) && !shooting){
			idle = false;
			walking = true;
			
			if(facingRight){
				if(Math.abs(x - player.x) <=50){
					x+=0;
				}
				else{
					x+=1;
				}
			}
			else if(!facingRight){
				if(Math.abs(x - player.x) <=50){
					x-=0;
				}
				else{
				x-=1;
				}
			}
		
		}
		else{
			idle = true;
			walking = false;
		}
		if(Math.abs(x - player.x) <=100 && (Math.abs(y - player.y) <=20)){
			x+=0;
			x-=0;
			shooting = true;
			idle = false;
			walking = false;
			
		}
		else{
			idle = true;
			shooting = false;
		}
		if(flinching){
			walking = false;
			idle = false;
			
		}
		
		if(walking){
			idle = false;
		}
		
		
		
	}