mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
23 lines
336 B
Go
23 lines
336 B
Go
package ebiten
|
|
|
|
import (
|
|
"github.com/hajimehoshi/go-ebiten/graphics"
|
|
)
|
|
|
|
type Game interface {
|
|
InitTextures(tf graphics.TextureFactory)
|
|
Update(context GameContext)
|
|
Draw(canvas graphics.Canvas)
|
|
}
|
|
|
|
type GameContext interface {
|
|
ScreenWidth() int
|
|
ScreenHeight() int
|
|
InputState() InputState
|
|
}
|
|
|
|
type InputState struct {
|
|
X int
|
|
Y int
|
|
}
|