18 lines
376 B
Go
18 lines
376 B
Go
//go:build js && wasm
|
|
// +build js,wasm
|
|
|
|
package main
|
|
|
|
import (
|
|
"log"
|
|
"syscall/js"
|
|
)
|
|
|
|
// notifyGameStarted benachrichtigt JavaScript dass das Spiel startet
|
|
func (g *Game) notifyGameStarted() {
|
|
if startFunc := js.Global().Get("onGameStarted"); !startFunc.IsUndefined() {
|
|
startFunc.Invoke()
|
|
log.Println("🎮 Game Started - Benachrichtigung an JavaScript gesendet")
|
|
}
|
|
}
|