2024-02-06 15:26:20 +01:00
|
|
|
package game
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/hajimehoshi/ebiten/v2"
|
|
|
|
|
)
|
|
|
|
|
|
2024-02-06 19:02:25 +01:00
|
|
|
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 {
|
2024-02-06 19:02:25 +01:00
|
|
|
SetNext() int
|
2024-02-06 15:26:20 +01:00
|
|
|
Update() error
|
|
|
|
|
Draw(screen *ebiten.Image)
|
|
|
|
|
}
|