HUD вываживания: escape-полоска рисуется поверх синей и слева направо (раньше — справа налево под синей). 117/117, exit 0

This commit is contained in:
2026-09-06 22:41:18 +03:00
parent f843bc8033
commit c1e0389e44
+6 -6
View File
@@ -1661,12 +1661,6 @@ function drawMeters(){
// --- дистанция (снизу) ---
const dw=W-96, dx=22, dy=H-52, dh=13;
ctx.fillStyle='rgba(0,0,0,0.35)'; rr(dx,dy,dw,dh,7); ctx.fill();
// escape: красная заливка справа налево (рыба ускользает)
if(reel.escape>0.01){
const ew=(dw-4)*reel.escape;
ctx.fillStyle='rgba(231,76,60,0.7)';
rr(dx+dw-2-ew,dy+2,ew,dh-4,5); ctx.fill();
}
// rem = доля оставшейся дистанции: полоска «сгорает» к лодке, рыбка на её конце
const rem=Math.max(0,Math.min(1,reel.d/reel.d0));
if(rem>0.01){
@@ -1675,6 +1669,12 @@ function drawMeters(){
ctx.fillStyle=dg;
rr(dx+2,dy+2,Math.max(2,(dw-4)*rem),dh-4,5); ctx.fill();
}
// escape: красная заливка поверх синей, слева направо (рыба ускользает)
if(reel.escape>0.01){
const ew=(dw-4)*reel.escape;
ctx.fillStyle='rgba(231,76,60,0.7)';
rr(dx+2,dy+2,ew,dh-4,5); ctx.fill();
}
// рыбка-маркер на конце полоски
const fx=dx+2+(dw-4)*rem;
ctx.font='20px system-ui'; ctx.textAlign='center';