...
This commit is contained in:
parent
28622fda2d
commit
dbd1b50ff7
1 changed files with 0 additions and 44 deletions
44
src/gx/\
44
src/gx/\
|
@ -1,44 +0,0 @@
|
|||
package gx
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten/v2"
|
||||
)
|
||||
|
||||
type WindowConfig struct {
|
||||
Title string
|
||||
Width, Height int
|
||||
}
|
||||
|
||||
type Engine struct {
|
||||
wcfg *WindowConfig
|
||||
}
|
||||
|
||||
type engine Engine
|
||||
|
||||
func New(
|
||||
title string,
|
||||
w, h int,
|
||||
) *Engine {
|
||||
e := &Engine{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func (e *engine) Update() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (e *engine) Draw(s *ebiten.Image) {
|
||||
}
|
||||
|
||||
func (e *engine) Layout(ow, oh int) (int, int) {
|
||||
return e.wcfg.Width, e.wcfg.Height
|
||||
}
|
||||
|
||||
func (e *Engine) Run() error {
|
||||
ebiten.SetWindowTitle(e.wcfg.Title)
|
||||
ebiten.SetWindowSize(e.wcfg.Width, e.wcfg.Height)
|
||||
|
||||
return ebiten.RunGame(engine(e))
|
||||
}
|
||||
|
Loading…
Reference in a new issue