openquell/game/scene.go

28 lines
529 B
Go
Raw Normal View History

2024-02-06 15:26:20 +01:00
package game
import (
"github.com/hajimehoshi/ebiten/v2"
)
const (
Welcome = iota
Select
Play
About
Settings
)
2024-02-06 15:26:20 +01:00
// Wrapper for different screens to be shown, as Welcome, Options,
// About, Select Level and of course the actual Levels.
// Scenes are responsible for screen clearing! That way a scene is able
// to render its content onto the running level, e.g. the options scene
// etc.
type Scene interface {
SetNext(SceneName)
GetNext() SceneName
2024-02-06 15:26:20 +01:00
Update() error
Draw(screen *ebiten.Image)
}
type SceneName int