This commit is contained in:
Renan LE CARO 2025-04-30 16:29:49 +02:00
parent cee5c6bc60
commit 45f9b516fc
23 changed files with 1069 additions and 797 deletions

View file

@ -368,11 +368,11 @@ export function render(gameState: GameState) {
});
//
startWork("render:extra_life");
if (gameState.extra_lives) {
if (gameState.perks.extra_life) {
ctx.globalAlpha = gameState.balls.length > 1 ? 0.2 : 1;
ctx.globalCompositeOperation = "source-over";
ctx.fillStyle = gameState.puckColor;
for (let i = 0; i < gameState.extra_lives; i++) {
for (let i = 0; i < gameState.perks.extra_life; i++) {
ctx.fillRect(
gameState.offsetXRoundedDown,
gameState.gameZoneHeight - gameState.puckHeight / 2 + 2 * i,