Perbaiki genangan asam jurus lob yang melayang di atas lantai (pusat gambar di lantai)
This commit is contained in:
parent
b2e8d434f6
commit
0ee8c88529
2
game.js
2
game.js
|
|
@ -1088,7 +1088,7 @@
|
|||
for (const h of cfx.hazards) {
|
||||
if (h.fire) { fxDrawFire(h); continue; }
|
||||
const im = images[h.img]; if (!im) continue; const fade = h.t > h.life - .6 ? Math.max(0, (h.life - h.t) / .6) : 1, w = h.radius * 2.4, hh = im.height / im.width * w;
|
||||
ctx.save(); ctx.globalAlpha = .9 * fade; ctx.drawImage(im, Math.round(h.x - w / 2), CONFIG.groundY + 6 - hh, w, hh); ctx.restore();
|
||||
ctx.save(); ctx.globalAlpha = .9 * fade; ctx.drawImage(im, Math.round(h.x - w / 2), Math.round(CONFIG.groundY + 4 - hh / 2), w, hh); ctx.restore(); // genangan terlihat di tengah gambar persegi: pusatnya diletakkan di lantai
|
||||
}
|
||||
}
|
||||
function drawCfFront() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue