diff --git a/cmd/client/game_render.go b/cmd/client/game_render.go index 7094c17..ae85a43 100644 --- a/cmd/client/game_render.go +++ b/cmd/client/game_render.go @@ -313,8 +313,10 @@ func (g *Game) DrawGame(screen *ebiten.Image) { g.DrawAsset(screen, mp.AssetID, mp.X, mp.Y) } - // 2.6 DEBUG: Basis-Boden-Collider visualisieren (GRÜN) - UNTER dem Gras bis tief in die Erde - vector.StrokeRect(screen, float32(-g.camX), float32(540), 10000, float32(5000), float32(2), color.RGBA{0, 255, 0, 255}, false) + // 2.6 DEBUG: Basis-Boden-Collider visualisieren (GRÜN) - NUR IM DEBUG-MODUS + if g.showDebug { + vector.StrokeRect(screen, float32(-g.camX), float32(540), 10000, float32(5000), float32(2), color.RGBA{0, 255, 0, 255}, false) + } // 3. Spieler for id, p := range g.gameState.Players { @@ -358,15 +360,17 @@ func (g *Game) DrawGame(screen *ebiten.Image) { } text.Draw(screen, name, basicfont.Face7x13, int(posX-g.camX), int(posY-25), ColText) - // HITBOX VISUALISIERUNG (IMMER SICHTBAR) - if def, ok := g.world.Manifest.Assets["player"]; ok { - // Spieler-Hitbox (ROT) - hx := float32(posX + def.DrawOffX + def.Hitbox.OffsetX - g.camX) - hy := float32(posY + def.DrawOffY + def.Hitbox.OffsetY) - vector.StrokeRect(screen, hx, hy, float32(def.Hitbox.W), float32(def.Hitbox.H), 3, color.RGBA{255, 0, 0, 255}, false) + // HITBOX VISUALISIERUNG (NUR IM DEBUG-MODUS) + if g.showDebug { + if def, ok := g.world.Manifest.Assets["player"]; ok { + // Spieler-Hitbox (ROT) + hx := float32(posX + def.DrawOffX + def.Hitbox.OffsetX - g.camX) + hy := float32(posY + def.DrawOffY + def.Hitbox.OffsetY) + vector.StrokeRect(screen, hx, hy, float32(def.Hitbox.W), float32(def.Hitbox.H), 3, color.RGBA{255, 0, 0, 255}, false) - // Spieler-Position als Punkt (GELB) - vector.DrawFilledCircle(screen, float32(posX-g.camX), float32(posY), 5, color.RGBA{255, 255, 0, 255}, false) + // Spieler-Position als Punkt (GELB) + vector.DrawFilledCircle(screen, float32(posX-g.camX), float32(posY), 5, color.RGBA{255, 255, 0, 255}, false) + } } } diff --git a/cmd/client/web/main.wasm b/cmd/client/web/main.wasm index e36647d..944b46a 100755 Binary files a/cmd/client/web/main.wasm and b/cmd/client/web/main.wasm differ