fix game
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 6m49s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 6m49s
This commit is contained in:
@@ -43,6 +43,18 @@ func (g *Game) drawGameOverScreen(screen *ebiten.Image, myScore int) {
|
||||
// Großes GAME OVER
|
||||
text.Draw(screen, "GAME OVER", basicfont.Face7x13, ScreenWidth/2-50, 60, color.RGBA{255, 0, 0, 255})
|
||||
|
||||
// Highscore prüfen und aktualisieren
|
||||
if myScore > g.localHighscore {
|
||||
g.localHighscore = myScore
|
||||
g.saveHighscore(myScore)
|
||||
}
|
||||
// Persönlicher Highscore anzeigen
|
||||
if myScore == g.localHighscore && myScore > 0 {
|
||||
text.Draw(screen, fmt.Sprintf("★ NEUER REKORD: %d ★", g.localHighscore), basicfont.Face7x13, ScreenWidth/2-80, 85, color.RGBA{255, 215, 0, 255})
|
||||
} else {
|
||||
text.Draw(screen, fmt.Sprintf("Persönlicher Highscore: %d", g.localHighscore), basicfont.Face7x13, ScreenWidth/2-80, 85, color.Gray{Y: 180})
|
||||
}
|
||||
|
||||
// Linke Seite: Raum-Ergebnisse - Daten KOPIEREN mit Lock, dann außerhalb zeichnen
|
||||
text.Draw(screen, "=== RAUM ERGEBNISSE ===", basicfont.Face7x13, 50, 120, color.RGBA{255, 255, 0, 255})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user