mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-25 22:46:15 -04:00
Fixed : combo display on small pucks
This commit is contained in:
parent
af02565bf1
commit
f49da76667
3 changed files with 13 additions and 7 deletions
10
dist/index.html
vendored
10
dist/index.html
vendored
|
@ -3515,7 +3515,15 @@ function render(gameState) {
|
|||
if (totalWidth < gameState.puckWidth) {
|
||||
drawCoin(ctx, "gold", gameState.coinSize, left + gameState.coinSize / 2, gameState.gameZoneHeight - gameState.puckHeight / 2, gameState.puckColor, 0);
|
||||
drawText(ctx, comboText, "#000", gameState.puckHeight, left + gameState.coinSize * 1.5, gameState.gameZoneHeight - gameState.puckHeight / 2, true);
|
||||
} else drawText(ctx, comboText, "#FFF", gameState.puckHeight, gameState.puckPosition, gameState.gameZoneHeight - gameState.puckHeight / 2, false);
|
||||
} else {
|
||||
console.log({
|
||||
comboTextWidth,
|
||||
pw: gameState.puckWidth,
|
||||
combo: gameState.combo,
|
||||
comboText
|
||||
});
|
||||
drawText(ctx, comboTextWidth > gameState.puckWidth ? gameState.combo.toString() : comboText, "#000", comboTextWidth > gameState.puckWidth ? 12 : 20, gameState.puckPosition, gameState.gameZoneHeight - gameState.puckHeight / 2, false);
|
||||
}
|
||||
}
|
||||
// Borders
|
||||
const hasCombo = gameState.combo > (0, _gameStateMutators.baseCombo)(gameState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue