Private
Public Access
1
0

Add platform-specific implementations for assets, audio, WebSocket, and rendering on Desktop and WebAssembly platforms. Introduce embedded assets for WebAssembly and native file handling for Desktop. Add platform-specific chunk loading and game state synchronization.

This commit is contained in:
Sebastian Unterschütz
2026-01-04 01:25:04 +01:00
parent 85d697df19
commit 3232ee7c2f
86 changed files with 4931 additions and 486 deletions

28
cmd/client/draw_wasm.go Normal file
View File

@@ -0,0 +1,28 @@
//go:build js && wasm
// +build js,wasm
package main
import (
"image/color"
"github.com/hajimehoshi/ebiten/v2"
)
// In WASM: Menü und Leaderboard werden in HTML angezeigt
// Lobby wird aber normal gezeichnet (für Co-op Warteraum)
func (g *Game) drawMenu(screen *ebiten.Image) {
// Schwarzer Hintergrund - HTML-Menü ist darüber
screen.Fill(color.RGBA{0, 0, 0, 255})
}
func (g *Game) drawLobby(screen *ebiten.Image) {
// Lobby wird normal gezeichnet (für Co-op Warteraum)
g.DrawLobby(screen)
}
func (g *Game) drawLeaderboard(screen *ebiten.Image) {
// Schwarzer Hintergrund - HTML-Leaderboard ist darüber
screen.Fill(color.RGBA{0, 0, 0, 255})
}