fix game
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 6m51s
All checks were successful
Dynamic Branch Deploy / build-and-deploy (push) Successful in 6m51s
This commit is contained in:
@@ -509,9 +509,8 @@ func (g *Game) DrawGame(screen *ebiten.Image) {
|
||||
text.Draw(screen, msg, basicfont.Face7x13, canvasW/2-40, canvasH/2, color.RGBA{255, 255, 0, 255})
|
||||
} else if g.gameState.Status == "RUNNING" {
|
||||
// Danger-Overlay: Ab DifficultyFactor > 0.5 rötlicher Bildschirmrand
|
||||
g.stateMutex.Lock()
|
||||
// stateMutex ist bereits seit Zeile 388 per defer gehalten – kein erneuter Lock!
|
||||
df := g.gameState.DifficultyFactor
|
||||
g.stateMutex.Unlock()
|
||||
if df > 0.5 {
|
||||
// Alpha von 0 (bei df=0.5) bis 60 (bei df=1.0)
|
||||
dangerAlpha := uint8((df - 0.5) * 2.0 * 60)
|
||||
|
||||
Reference in New Issue
Block a user