more
This commit is contained in:
parent
7b321a549f
commit
b396b247a2
2 changed files with 4 additions and 3 deletions
|
@ -6,12 +6,13 @@ import (
|
|||
"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 {
|
||||
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 {
|
||||
Draw(*ebiten.Image)
|
||||
DrawAfter(Drawer) bool
|
||||
|
|
2
main.go
2
main.go
|
@ -19,6 +19,6 @@ func main() {
|
|||
engine.TPSDisplay{},
|
||||
},
|
||||
}); err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("Game error: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue