From 1279dc9f8fa409a628fb8ed4b2d51fa369e1df32 Mon Sep 17 00:00:00 2001 From: unanmed <1319491857@qq.com> Date: Sun, 21 Apr 2024 13:40:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- idea.md | 2 +- src/plugin/game/enemy/checkblock.ts | 53 ----------------------------- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/idea.md b/idea.md index fd8629a..61d5c4d 100644 --- a/idea.md +++ b/idea.md @@ -102,7 +102,7 @@ dam4.png ---- 存档 59 [x] 着色器特效 [x] 完全删除 core.plugin,采用 Plugin.register 的形式进行插件编写 [] 通用 Addon 接口 -[] 完善加载系统 +[x] 完善加载系统 [] 不同怪物可以在怪物手册中添加一些不同的边框 [] 按住一个按键时显示怪物的攻防血 [] 新的事件系统,并丰富自定义事件 diff --git a/src/plugin/game/enemy/checkblock.ts b/src/plugin/game/enemy/checkblock.ts index 95cb588..4a59174 100644 --- a/src/plugin/game/enemy/checkblock.ts +++ b/src/plugin/game/enemy/checkblock.ts @@ -84,59 +84,6 @@ export function init() { } core.fillBoldText(ctx, one.text, px, py, one.color as string); }); - - ctx.save(); - ctx.lineCap = 'round'; - ctx.lineJoin = 'round'; - ctx.lineWidth = 2; - core.status.damage.dir.forEach(v => { - let x = v.x; - let y = v.y; - if (onMap && core.bigmap.v2) { - x -= core.bigmap.posX; - y -= core.bigmap.posY; - } - if (x < -1 || x > 15 || y < 0 || y > 15) return; - let px = x * 32; - let py = y * 32; - ctx.beginPath(); - if (v.dir === 'down') { - py -= 32; - ctx.moveTo(px + 16, py + 18); - ctx.lineTo(px + 16, py + 32); - ctx.moveTo(px + 10, py + 26); - ctx.lineTo(px + 16, py + 32); - ctx.lineTo(px + 22, py + 26); - } else if (v.dir === 'left') { - px += 32; - ctx.moveTo(px + 14, py + 16); - ctx.lineTo(px, py + 16); - ctx.moveTo(px + 6, py + 10); - ctx.lineTo(px, py + 16); - ctx.lineTo(px + 6, py + 22); - } else if (v.dir === 'up') { - py += 32; - ctx.moveTo(px + 16, py + 14); - ctx.lineTo(px + 16, py); - ctx.moveTo(px + 10, py + 6); - ctx.lineTo(px + 16, py); - ctx.lineTo(px + 22, py + 6); - } else { - px -= 32; - ctx.moveTo(px + 18, py + 16); - ctx.lineTo(px + 32, py + 16); - ctx.moveTo(px + 26, py + 10); - ctx.lineTo(px + 32, py + 16); - ctx.lineTo(px + 26, py + 22); - } - ctx.strokeStyle = 'black'; - ctx.lineWidth = 2.5; - ctx.stroke(); - ctx.strokeStyle = v.color as string; - ctx.lineWidth = 1; - ctx.stroke(); - }); - ctx.restore(); }; control.prototype.moveHero = function (