This commit is contained in:
Josh Deprez 2021-07-23 14:59:49 +10:00 committed by Josh Deprez
parent 7b321a549f
commit b396b247a2
2 changed files with 4 additions and 3 deletions

View file

@ -6,12 +6,13 @@ import (
"github.com/hajimehoshi/ebiten/v2" "github.com/hajimehoshi/ebiten/v2"
) )
// Updater is a component that can update (called repeatedly). // Updater is a component that can update. Update is called repeatedly.
type Updater interface { type Updater interface {
Update() error Update() error
} }
// Drawer is a component that can draw itself (called repeatedly). // Drawer is a component that can draw itself. Draw is called often.
// DrawAfter is used to reorder components.
type Drawer interface { type Drawer interface {
Draw(*ebiten.Image) Draw(*ebiten.Image)
DrawAfter(Drawer) bool DrawAfter(Drawer) bool

View file

@ -19,6 +19,6 @@ func main() {
engine.TPSDisplay{}, engine.TPSDisplay{},
}, },
}); err != nil { }); err != nil {
log.Fatal(err) log.Fatalf("Game error: %v", err)
} }
} }