Private
Public Access
1
0

add teacher and milestone quotes: implement random quotes, speech bubbles, and milestone achievements display
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Failing after 1m35s

This commit is contained in:
Sebastian Unterschütz
2026-04-22 19:53:15 +02:00
parent 8454557f16
commit 568ce516e7
3 changed files with 115 additions and 3 deletions

View File

@@ -45,6 +45,14 @@ 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})
// Lehrer-Spruch zum Abschied
if g.deathQuote.Text != "" {
quoteMsg := fmt.Sprintf("\"%s\"", g.deathQuote.Text)
quoteW := len(quoteMsg) * 7
// Zentrieren und ggf. umbrechen wenn zu lang (hier erstmal einfach zentriert)
text.Draw(screen, quoteMsg, basicfont.Face7x13, ScreenWidth/2-quoteW/2, 80, color.RGBA{200, 200, 200, 255})
}
// Highscore prüfen und aktualisieren
if myScore > g.localHighscore {
g.localHighscore = myScore
@@ -52,9 +60,9 @@ func (g *Game) drawGameOverScreen(screen *ebiten.Image, myScore int) {
}
// 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})
text.Draw(screen, fmt.Sprintf("★ NEUER REKORD: %d ★", g.localHighscore), basicfont.Face7x13, ScreenWidth/2-80, 105, 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})
text.Draw(screen, fmt.Sprintf("Persönlicher Highscore: %d", g.localHighscore), basicfont.Face7x13, ScreenWidth/2-100, 105, color.Gray{Y: 180})
}
// Linke Seite: Raum-Ergebnisse - Daten KOPIEREN mit Lock, dann außerhalb zeichnen