menustate

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MenuState struct {
	// Replays is a list of replays.
	Replays []*replay.Watcher

	// Levels is a list of levels.
	Levels map[string]*config.Level

	// Ended is true if the menu is ended.
	Ended bool

	// UI is a UI of the menu.
	UI *ebitenui.UI

	// Next is a name of the next level.
	Next string

	// NextReplay is an index of the next replay.
	NextReplay int

	// State is a state of the player.
	State *ingame.PlayerState
}

MenuState is a struct that represents the state of the menu.

func New

func New(state *ingame.PlayerState, configs map[string]*config.Level, replays []*replay.Watcher, widgets general.Widgets) *MenuState

New creates a new entity of MenuState.

func (m *MenuState) Draw(image *ebiten.Image)

Draw draws the menu.

func (m *MenuState) End() bool

End returns true if the menu is ended.

func (m *MenuState) Update() error

Update updates the menu.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL