@Override
	protected void etick(){
		checkTargets();
		mtick();
		if(targetEntity != null){
			if(nearPlayer()){
				if(!spotted){
					idle = false;
					spotted = true;
					if(soundEffects && foundStr != null)
						SoundManager.playSoundEffect(foundStr);
				}
			}
			if(!farPlayer() && spotted){
				spotted = false;
				targetEntity = null;
			}
		}
		if(spotted){
			if(ranged){
				if(shootFactor == shootMax){
					shoot();
					shootFactor = 0;
				} else {
					shootFactor++;
				}
			}
			if(melee){
				if(targetEntity.intersects(this)){
					if(attackFactor == attackMax){
						attack();
						attackFactor = 0;
					} else {
						attackFactor++;
					}
				}
			}
		}
		
	}