mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
28 lines
364 B
Go
28 lines
364 B
Go
package ebiten
|
|
|
|
import (
|
|
"github.com/hajimehoshi/go.ebiten/graphics"
|
|
)
|
|
|
|
const (
|
|
FPS = 60
|
|
)
|
|
|
|
type Game interface {
|
|
Init(tf graphics.TextureFactory)
|
|
Update(context GameContext)
|
|
Draw(context graphics.Context)
|
|
}
|
|
|
|
type GameContext interface {
|
|
ScreenWidth() int
|
|
ScreenHeight() int
|
|
InputState() InputState
|
|
Terminate()
|
|
}
|
|
|
|
type InputState struct {
|
|
X int
|
|
Y int
|
|
}
|