public TextBox(Entity owner, String message, boolean kill) {
		this.ID = "textBox";
		this.x = owner.getPosition().x*Vars.PPM + owner.rh;
		this.y = owner.getPosition().y*Vars.PPM + owner.rw / 2;
		origLayer = Vars.BIT_LAYER1;
		isAttackable = false;
		selfKill = kill;
		
		animation = new Animation(this);
		this.msgSrc = Vars.formatDialog(message, false);
		text = msgSrc.split("/l");
		setGameState(owner.getGameState());
		this.owner = owner;
		main.addObject(this);
		contacts = new Array<>();
		
		if(selfKill){
			int n = message.split(" ").length /* *1.5f*/;
			float m = 15, o = 2, a = 2*(m - o), b = 4f/a;
			lifetime = (float) (a/(1+Math.exp(-b*n)) - a/2 + o);
//			System.out.println("("+n+", "+lifetime+")");
		} else
			lifetime = 0;
		double c = (Math.random());
		if(c>.5) side = 1;
		else side = -1;
		
		font = TextureRegion.split(Game.res.getTexture("text3"), 7, 9 )[2];
		top = new TextureRegion(Game.res.getTexture("textBox"), 6, 0, 42, 7);
		bottom = new TextureRegion(Game.res.getTexture("textBox"), 6, 14, 21, 9);
		left = new TextureRegion(Game.res.getTexture("textBox"), 0, 7, 6, 7);
		right = new TextureRegion(Game.res.getTexture("textBox"), 48, 7, 6, 7);
		center = new TextureRegion(Game.res.getTexture("textBox"), 6, 7, 42, 7);
		spike = new TextureRegion(Game.res.getTexture("textBox"), 27, 14, 11, 15);
		cornerTL = new TextureRegion(Game.res.getTexture("textBox"), 6, 7);
		cornerTR = new TextureRegion(Game.res.getTexture("textBox"), 48, 0, 6, 7);
		cornerBL = new TextureRegion(Game.res.getTexture("textBox"), 0, 14, 6, 9);
		cornerBR = new TextureRegion(Game.res.getTexture("textBox"), 48, 14, 6, 9);
			
		rw = rh = 2;
		
		int max = 0;
		for(String s : text)
			if(s.length()>max){
				s = s.trim();
				max = s.length();
			}
		
		maxWidth = max * (font[0].getRegionWidth() + 1);
		maxHeight = text.length * (font[0].getRegionHeight());
		speedX = (5*maxWidth*Vars.DT) / SIZE_TIME;
		speedY = (5*maxHeight*Vars.DT) / SIZE_TIME;
		if(speedX<2)speedX=2;
		if(speedY<2)speedY=2;
		width = cornerTL.getRegionWidth() + maxWidth + cornerTR.getRegionWidth();
		height = cornerTL.getRegionHeight() + maxHeight + cornerBL.getRegionHeight();
		innerWidth = innerHeight = 1;
		expand();
	}