From a206565ac1745f25bae0bc7900ba3fd15d7ff4e3 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Thu, 6 Aug 2026 14:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E9=92=A2=E7=90=B4Boss=E5=A4=A7=E6=BF=80?= =?UTF-8?q?=E5=85=89=E5=8D=8A=E5=9C=86=E4=BF=AE=E6=AD=A3=EF=BC=9A=E6=9C=80?= =?UTF-8?q?=E9=AB=98=E7=82=B9=3D=E7=82=AE=E5=8F=A3+=E5=92=8C=E6=BF=80?= =?UTF-8?q?=E5=85=89=E4=B8=80=E8=B5=B7=E5=87=BA=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 圆心从(bm.x1,bm.y1)改为(bm.x1,bm.y1+pR),半圆最高点正好在炮口位置 - 删除(1-life/dur0)单独动画,半圆是激光本体一部分,和激光一起出现一起消失 - 删除dur0字段依赖 --- star-raid/js/render.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/star-raid/js/render.js b/star-raid/js/render.js index f8c1b64..9bb6f47 100644 --- a/star-raid/js/render.js +++ b/star-raid/js/render.js @@ -224,12 +224,12 @@ function drawBossFx(){ ctx.beginPath();ctx.moveTo(bm.x1,bm.y1);ctx.lineTo(bm.x2,bm.y2);ctx.stroke();ctx.globalAlpha=1;}} else{ctx.globalCompositeOperation="lighter"; ctx.globalAlpha=clamp(bm.life/10,0,1)*0.85; - // 大激光起点扩口半圆(直径=激光宽度,半圆顶部向上凸起覆盖矩形上边) - if(bm.dmg>=90000){const pR=Math.min(bm.w*0.5,bm.w*0.5*(1-bm.life/(bm.dur0||1))+1); - if(pR>1){ctx.fillStyle=bm.col; - ctx.beginPath();ctx.arc(bm.x1,bm.y1,pR,Math.PI,0);ctx.fill(); - ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,pR/3); - ctx.beginPath();ctx.arc(bm.x1,bm.y1,pR,Math.PI,0);ctx.stroke();}} + // 大激光起点扩口半圆:直径=激光宽度,圆心在炮口下方pR处,最高点=炮口,和激光一起出现 + if(bm.dmg>=90000){const pR=bm.w*0.5; + ctx.fillStyle=bm.col; + ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,Math.PI,0);ctx.fill(); + ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,pR/3); + ctx.beginPath();ctx.arc(bm.x1,bm.y1+pR,pR,Math.PI,0);ctx.stroke();} ctx.strokeStyle=bm.col;ctx.lineWidth=bm.w; ctx.beginPath();ctx.moveTo(bm.x1,bm.y1);ctx.lineTo(bm.x2,bm.y2);ctx.stroke(); ctx.strokeStyle="#fff";ctx.lineWidth=Math.max(1,bm.w/3);