public void update(){
	    if(!isDead()){	
    		if(getHealth() > 0){
	    		if(isHostile && detectedPlayer){
	    			moveToPlayer();    		
	    		}else{
	    			moveRandom();
	    		}
	    	}else{
	    		die();	    		
	    	}
	    }
    }