Private
Public Access
1
0

fix game
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Failing after 2m0s

This commit is contained in:
Sebastian Unterschütz
2026-04-22 11:38:35 +02:00
parent a6cfc055be
commit 2286c18432
5 changed files with 29 additions and 7 deletions

View File

@@ -245,6 +245,11 @@ func (g *Game) UpdateGame() {
g.SendInputWithSequence(input)
// Solo: Lokale Prüfung der Runde (Tod/Score)
if g.gameMode == "solo" {
g.checkSoloRound()
}
// Trail: store predicted position every physics step
g.trail = append(g.trail, trailPoint{X: g.predictedX, Y: g.predictedY})
if len(g.trail) > 8 {

View File

@@ -168,7 +168,7 @@ func (g *Game) drawGameOverScreen(screen *ebiten.Image, myScore int) {
text.Draw(screen, "SUBMIT SCORE", basicfont.Face7x13, submitBtnX+50, submitBtnY+25, color.White)
} else if g.gameMode == "solo" && g.scoreSubmitted {
// Solo: Zeige Bestätigungsmeldung
text.Draw(screen, "Score eingereicht!", basicfont.Face7x13, ScreenWidth/2-70, ScreenHeight-100, color.RGBA{0, 255, 0, 255})
text.Draw(screen, "✓ Runde verifiziert & Score eingereicht!", basicfont.Face7x13, ScreenWidth/2-110, ScreenHeight-100, color.RGBA{0, 255, 0, 255})
} else if g.gameMode == "coop" && !g.isHost {
// Coop Non-Host: Warten auf Host
text.Draw(screen, "Warte auf Host...", basicfont.Face7x13, ScreenWidth/2-70, ScreenHeight-100, color.Gray{180})

View File

@@ -139,6 +139,7 @@ type Game struct {
// Highscore
localHighscore int
roundStartTime time.Time // Startzeit der aktuellen Runde (für Solo)
// Audio System
audio *AudioSystem
@@ -271,9 +272,13 @@ func (g *Game) Update() error {
}
if currentStatus == "RUNNING" && g.lastStatus != "RUNNING" {
g.audio.PlayMusic()
g.roundStartTime = time.Now()
}
if currentStatus == "GAMEOVER" && g.lastStatus == "RUNNING" {
g.audio.StopMusic()
if g.gameMode == "solo" {
g.verifyRoundResult()
}
}
g.lastStatus = currentStatus