@Override
	public void update(double dt) {
		super.update(dt);
		box.x = (int) e.getX() - (int) (box.width/2);
		box.y = (int) e.getY() - box.height;
		
		if( !validBox)
			currentText = (int) ((time / TIME_BEFORE_NEXT_STR) % texts.length);
		else
			if(input.validate.released || input.leftButton.released)
				currentText += 1;
		
		if (currentText >= texts.length || time > TIME_BEFORE_NEXT_STR * texts.length){
			level.removeEntity(this);
			e.stopSpeaking();
			if (validBox)
				interlocutor.stopSpeaking();
			return;
		}
		
		box.width = Math.max(texts[currentText][0].length(), texts[currentText][1].length()) * (FONTSIZE+1) / 2;
	}