diff --git "a/\346\273\221\345\235\227\351\252\214\350\257\201\347\240\201" "b/\346\273\221\345\235\227\351\252\214\350\257\201\347\240\201" new file mode 100644 index 0000000000000000000000000000000000000000..5b41c76328ce1b603b443cd85910926ffa576ec7 --- /dev/null +++ "b/\346\273\221\345\235\227\351\252\214\350\257\201\347\240\201" @@ -0,0 +1,16 @@ +for (Integer x : align) { // 对齐操作 + int y = (int) (Math.random() * offsetY * (locationY > 0 ? -1 : 1)); + locationX += x; // 偏移补偿 + locationY += y; // Y轴偏移适当抖动,不需要精确对齐 + logger.info("align move (" + x + ", " + y + ", " + locationX + ", " + locationY + ")"); + array.add(DPUtil.objectNode().put("x", x).put("y", y)); +} +if (locationX != targetX) { // 精确定位 + int x = targetX - locationX, y = (int) (Math.random() * offsetY * (locationY > 0 ? -1 : 1)); + locationX += x; + locationY += y; + logger.info("target move (" + x + ", " + y + ", " + locationX + ", " + locationY + ")"); + node.put("stopX", x).put("stopY", y); +} else { + node.put("stopX", 0).put("stopY", 0); +}