mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
mobile: Remove game definition and use ebiten.Game
This commit is contained in:
parent
61e422277f
commit
4fd39f258a
@ -24,15 +24,8 @@ import (
|
|||||||
|
|
||||||
var theState state
|
var theState state
|
||||||
|
|
||||||
// game is not exported since gomobile complains.
|
|
||||||
// TODO: Report this error.
|
|
||||||
type game interface {
|
|
||||||
Update(*ebiten.Image) error
|
|
||||||
Layout(viewWidth, viewHeight int) (screenWidth, screenHeight int)
|
|
||||||
}
|
|
||||||
|
|
||||||
type state struct {
|
type state struct {
|
||||||
game game
|
game ebiten.Game
|
||||||
|
|
||||||
delayedLayout func()
|
delayedLayout func()
|
||||||
|
|
||||||
@ -44,7 +37,7 @@ type state struct {
|
|||||||
m sync.Mutex
|
m sync.Mutex
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetGame(game game) {
|
func SetGame(game ebiten.Game) {
|
||||||
theState.m.Lock()
|
theState.m.Lock()
|
||||||
defer theState.m.Unlock()
|
defer theState.m.Unlock()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user