game engine

This commit is contained in:
2023-06-28 17:07:35 +02:00
parent 17b2aab4fa
commit e7babcd85f
2 changed files with 35 additions and 2 deletions

24
presenter/engine.go Normal file
View File

@@ -0,0 +1,24 @@
package presenter
import "github.com/hajimehoshi/ebiten"
const (
screenWidth = 320
screenHeight = 240
)
type GameEngine struct {
keys []ebiten.Key
}
func (g *GameEngine) Update(*ebiten.Image) error {
return nil
}
func (g *GameEngine) Draw(screen *ebiten.Image) {
}
func (g *GameEngine) Layout(outsideWidth, outsideHeight int) (int, int) {
return screenWidth, screenHeight
}