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
Some checks failed
Dynamic Branch Deploy / build-and-deploy (push) Failing after 1m35s
This commit is contained in:
@@ -29,6 +29,7 @@ const (
|
||||
StateLobby = 1
|
||||
StateGame = 2
|
||||
StateLeaderboard = 3
|
||||
StatePresentation = 4
|
||||
RefFloorY = 540 // Server-Welt Boden-Position (unveränderlich)
|
||||
)
|
||||
|
||||
@@ -170,6 +171,20 @@ type Game struct {
|
||||
// Audio System
|
||||
audio *AudioSystem
|
||||
|
||||
// Zitate / Sprüche
|
||||
teacherQuote game.Quote
|
||||
teacherQuoteTime time.Time
|
||||
milestoneQuote game.Quote
|
||||
milestoneQuoteTime time.Time
|
||||
deathQuote game.Quote
|
||||
lastMilestone int
|
||||
|
||||
// Presentation Mode
|
||||
presQuote game.Quote
|
||||
presQuoteTime time.Time
|
||||
presAssets []presAssetInstance
|
||||
lastPresUpdate time.Time
|
||||
|
||||
// Kamera
|
||||
camX float64
|
||||
|
||||
@@ -262,6 +277,17 @@ func (g *Game) Update() error {
|
||||
g.showDebug = !g.showDebug
|
||||
}
|
||||
|
||||
// Presentation Toggle (F1)
|
||||
if inpututil.IsKeyJustPressed(ebiten.KeyF1) {
|
||||
if g.appState == StatePresentation {
|
||||
g.appState = StateMenu
|
||||
} else {
|
||||
g.appState = StatePresentation
|
||||
g.presAssets = nil // Reset assets
|
||||
g.presQuoteTime = time.Now() // Force immediate first quote
|
||||
}
|
||||
}
|
||||
|
||||
// Pending Inputs zählen für Debug
|
||||
g.predictionMutex.Lock()
|
||||
g.pendingInputCount = len(g.pendingInputs)
|
||||
@@ -302,6 +328,7 @@ func (g *Game) Update() error {
|
||||
}
|
||||
if currentStatus == "GAMEOVER" && g.lastStatus == "RUNNING" {
|
||||
g.audio.StopMusic()
|
||||
g.deathQuote = game.GetRandomQuote()
|
||||
if g.gameMode == "solo" {
|
||||
g.verifyRoundResult()
|
||||
}
|
||||
@@ -317,6 +344,8 @@ func (g *Game) Update() error {
|
||||
g.UpdateGame()
|
||||
case StateLeaderboard:
|
||||
g.updateLeaderboard()
|
||||
case StatePresentation:
|
||||
g.updatePresentation()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -478,6 +507,8 @@ func (g *Game) draw(screen *ebiten.Image) {
|
||||
g.DrawGame(screen)
|
||||
case StateLeaderboard:
|
||||
g.drawLeaderboard(screen)
|
||||
case StatePresentation:
|
||||
g.drawPresentation(screen)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user