ebiten/ebiten.go

23 lines
338 B
Go
Raw Normal View History

2013-06-18 17:48:41 +02:00
package ebiten
import (
2013-10-14 04:34:58 +02:00
"github.com/hajimehoshi/go-ebiten/graphics"
2013-06-18 17:48:41 +02:00
)
type Game interface {
2013-10-20 08:51:26 +02:00
InitTextures(tf graphics.TextureFactory)
2013-07-05 14:02:17 +02:00
Update(context GameContext)
Draw(context graphics.Context)
2013-06-18 17:48:41 +02:00
}
2013-07-05 14:02:17 +02:00
type GameContext interface {
2013-10-09 16:34:11 +02:00
ScreenWidth() int
ScreenHeight() int
2013-07-05 14:02:17 +02:00
InputState() InputState
2013-06-19 02:36:57 +02:00
}
2013-06-25 03:27:32 +02:00
type InputState struct {
2013-07-04 16:57:53 +02:00
X int
Y int
2013-06-25 03:27:32 +02:00
}