mobile: Remove an alias Game

Fixes #1126
This commit is contained in:
Hajime Hoshi 2020-10-04 16:53:21 +09:00
parent dd4c8be988
commit dbbfcdac73
3 changed files with 8 additions and 6 deletions

View File

@ -17,9 +17,10 @@
package mobile package mobile
import ( import (
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/mobile/ebitenmobileview" "github.com/hajimehoshi/ebiten/v2/mobile/ebitenmobileview"
) )
func setGame(game Game) { func setGame(game ebiten.Game) {
ebitenmobileview.SetGame(game) ebitenmobileview.SetGame(game)
} }

View File

@ -17,6 +17,10 @@
package mobile package mobile
func setGame(game Game) { import (
"github.com/hajimehoshi/ebiten/v2"
)
func setGame(game ebiten.Game) {
panic("mobile: setGame is not implemented in this environment") panic("mobile: setGame is not implemented in this environment")
} }

View File

@ -23,14 +23,11 @@ import (
"github.com/hajimehoshi/ebiten/v2" "github.com/hajimehoshi/ebiten/v2"
) )
// Game defines necessary functions for a mobile game.
type Game = ebiten.Game
// SetGame sets a mobile game. // SetGame sets a mobile game.
// //
// SetGame is expected to be called only once. // SetGame is expected to be called only once.
// //
// SetGame can be called anytime. Until SetGame is called, the game does not start. // SetGame can be called anytime. Until SetGame is called, the game does not start.
func SetGame(game Game) { func SetGame(game ebiten.Game) {
setGame(game) setGame(game)
} }