Private
Public Access
1
0

bug fixes
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 1m55s

This commit is contained in:
Sebastian Unterschütz
2025-11-25 21:34:54 +01:00
parent 93491bd794
commit 3bf339f0ec

View File

@@ -53,7 +53,7 @@ function drawGame() {
// Haben wir Hintergründe geladen?
if (bgSprites.length > 0) {
// Wechsel alle 2000 Punkte (Server-Score) = 200 Punkte (Anzeige)
const changeInterval = 2000;
const changeInterval = 10000;
// Berechne Index: 0-1999 -> 0, 2000-3999 -> 1, etc.
// Das % (Modulo) sorgt dafür, dass es wieder von vorne anfängt, wenn die Bilder ausgehen
@@ -62,9 +62,8 @@ function drawGame() {
currentBg = bgSprites[bgIndex];
}
// Zeichnen (wenn Bild geladen und nicht kaputt)
if (currentBg && currentBg.complete && currentBg.naturalHeight !== 0) {
// Streckt das Bild exakt auf die Spielgröße (800x400)
ctx.drawImage(currentBg, 0, 0, GAME_WIDTH, GAME_HEIGHT);
} else {
// Fallback: Hellgrau, falls Bild fehlt