快速标记怪物

This commit is contained in:
AncTe committed 2022-12-30 11:06:46 +08:00
1 parent 1f1cd6ea3b
commit 3db34ffad9
11 files changed
+95 -14

No files matched your search

+19 -1
View File
@@ -116,5 +116,23 @@ export function checkMarkedEnemy(noMessage: boolean = false) {
export const checkMarkedStatus = ref(false);
export default function init() {
return { checkMarkedEnemy, checkStatus: checkMarkedStatus };
// 鼠标移动时进行监听,按下M时进行快速标记
core.registerAction(
'onmove',
'mark',
(x, y) => {
if (core.isPlaying()) {
flags.mouseLoc = [x, y];
}
return false;
},
150
);
return {
checkMarkedEnemy,
checkStatus: checkMarkedStatus,
markEnemy,
hasMarkedEnemy,
unmarkEnemy
};
}
+1 -1
View File
@@ -15,7 +15,7 @@ export default function init() {
* 弹出文字
*/
function popValue() {
let ctx = core.getContextByName('pop');
let ctx = core.getContextByName('pop')!;
if (!ctx) ctx = core.createCanvas('pop', 0, 0, core._PX_, core._PY_, 90);
core.clearMap(ctx);
let count = 0;
+1 -1
View File
@@ -14,7 +14,7 @@ type CanParseCss = keyof {
};
export default function init() {
return { has, getDamageColor, parseCss };
return { has, getDamageColor, parseCss, tip };
}
/**