comparison game/js/render.js @ 23:2f555a54c332

layout fixes and balancing
author ark
date 2026-10-20 12:04 +0200
parents fe680946164b
children 3f2811aebb3d
comparison
equal deleted inserted replaced
22:ad1b478fc4dc 23:2f555a54c332
174 ctx.lineTo(f.x - r, f.y + r); 174 ctx.lineTo(f.x - r, f.y + r);
175 ctx.stroke(); 175 ctx.stroke();
176 } 176 }
177 } 177 }
178 178
179 // coins flying from the monster to the coin counter, in screen pixels 179 // coins flying from a monster or an exit to the coin counter, in screen
180 // pixels
180 function drawFlights(ctx, game, L, view) { 181 function drawFlights(ctx, game, L, view) {
181 var dpr = view.dpr, ft = cfg.coins.flight_time; 182 var dpr = view.dpr, ft = cfg.coins.flight_time;
182 ctx.setTransform(dpr, 0, 0, dpr, 0, 0); 183 ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
183 game.flights.forEach(function (f) { 184 game.flights.forEach(function (f) {
184 var u = MM.util.clamp(f.t / ft, 0, 1); 185 var u = MM.util.clamp(f.t / ft, 0, 1);