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:
@@ -8,9 +8,10 @@ type InputMessage struct {
|
||||
|
||||
// State: Wo alles ist (Server -> Client)
|
||||
type GameStateMessage struct {
|
||||
Players map[string]*PlayerState `json:"players"` // Alle Spieler (1 bis 16)
|
||||
Score float64 `json:"score"`
|
||||
Multiplier int `json:"multiplier"`
|
||||
Players map[string]*PlayerState `json:"players"` // Alle Spieler (1 bis 16)
|
||||
Score float64 `json:"score"`
|
||||
Multiplier int `json:"multiplier"`
|
||||
MovingPlatforms []*MovingPlatformState `json:"moving_platforms"` // Bewegende Plattformen
|
||||
}
|
||||
|
||||
type PlayerState struct {
|
||||
@@ -18,3 +19,11 @@ type PlayerState struct {
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
}
|
||||
|
||||
type MovingPlatformState struct {
|
||||
ChunkID string `json:"chunk_id"`
|
||||
ObjectIdx int `json:"object_idx"`
|
||||
AssetID string `json:"asset_id"`
|
||||
X float64 `json:"x"`
|
||||
Y float64 `json:"y"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user