public void pathTo(Vector2i start, Vector2i end, int length){
		if(time % 4 == 0) path = pathfinder.findPath(start, end, length);
		if(path != null){
			if(path.size() > 0){
				Vector2i vec = path.get(path.size() - 1).getTile();
				int xa = 0;
				int ya = 0;
				if(chasing) speed = chaseSpeed;
				if(x < vec.getX() * 32) xa += speed;
				if(x > vec.getX() * 32) xa -= speed;
				if(y < vec.getY() * 32) ya += speed;
				if(y > vec.getY() * 32) ya -= speed;
								
				if(xa != 0 || ya != 0) move(xa, ya);
				
			}else{
				moving = false;
			}
		}
	}