mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-03 22:44:28 +01:00
monogame: Add a variable for a namespace that will be overwritten
This commit is contained in:
parent
edc58a2c9d
commit
cfe1aa1191
@ -29,8 +29,10 @@ import (
|
|||||||
// TODO: This implementation depends on some C# files that are not uploaded yet.
|
// TODO: This implementation depends on some C# files that are not uploaded yet.
|
||||||
// Create 'ebitenmonogame' command to generate C# project for the MonoGame.
|
// Create 'ebitenmonogame' command to generate C# project for the MonoGame.
|
||||||
|
|
||||||
// TODO: Update this
|
// namespace is C# namespace.
|
||||||
const temporaryNamespace = "Go2DotNet.Example.Ebiten"
|
//
|
||||||
|
// This is overwritten by -ldflags='-X github.com/hajimehoshi/ebiten/internal/monogame.namespace=NAMESPACE'.
|
||||||
|
var namespace = "Go2DotNet.Example.Ebiten"
|
||||||
|
|
||||||
type UpdateDrawer interface {
|
type UpdateDrawer interface {
|
||||||
Update() error
|
Update() error
|
||||||
@ -52,7 +54,7 @@ func NewGame(ud UpdateDrawer) *Game {
|
|||||||
return ud.Draw()
|
return ud.Draw()
|
||||||
})
|
})
|
||||||
|
|
||||||
v := js.Global().Get(".net").Get(temporaryNamespace+".GameGoBinding").New(update, draw)
|
v := js.Global().Get(".net").Get(namespace+".GameGoBinding").New(update, draw)
|
||||||
g := &Game{
|
g := &Game{
|
||||||
binding: v,
|
binding: v,
|
||||||
update: update,
|
update: update,
|
||||||
|
Loading…
Reference in New Issue
Block a user