mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-10-31 23:20:18 +08:00
完善定点查看
This commit is contained in:
1 parent
2cfbe4984f
commit
77d051dd27
8 files changed
+38
-16
No files matched your search
@@ -9,10 +9,12 @@ const show = debounce((ev: MouseEvent) => {
|
||||
if (!flags.mouseLoc) return;
|
||||
flags.clientLoc = [ev.clientX, ev.clientY];
|
||||
const [x, y] = flags.mouseLoc;
|
||||
const e = core.getBlockId(x, y);
|
||||
const mx = Math.round(x + core.bigmap.offsetX / 32);
|
||||
const my = Math.round(y + core.bigmap.offsetY / 32);
|
||||
const e = core.getBlockId(mx, my);
|
||||
if (!e || !core.getClsFromId(e)?.startsWith('enemy')) return;
|
||||
const enemy = core.material.enemys[e as EnemyIds];
|
||||
const detail = getDetailedEnemy(enemy, x, y);
|
||||
const detail = getDetailedEnemy(enemy, mx, my);
|
||||
core.plugin.bookDetailEnemy = detail;
|
||||
showFixed.value = true;
|
||||
}, 200);
|
||||
|
||||
Reference in new issue
Block a user