session

package
v0.0.0-...-a4c0b9d Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReloadLanguage

func ReloadLanguage(ctx *ge.Context, language string)

Types

type LevelCompletionInfo

type LevelCompletionInfo struct {
	Name  string `json:"name"`
	Bonus bool   `json:"bonus"`
}

type LevelCompletionStatus

type LevelCompletionStatus int
const (
	LevelNotCompleted LevelCompletionStatus = iota
	LevelCompleted
	LevelCompletedWithBonus
)

type PersistentData

type PersistentData struct {
	LevelsCompleted []LevelCompletionInfo `json:"levels_completed"`

	VolumeLevel int `json:"volume_level"`
}

func (*PersistentData) GetLevelCompletionStatus

func (d *PersistentData) GetLevelCompletionStatus(level *gamedata.LevelData) LevelCompletionStatus

func (*PersistentData) UpdateLevelCompletion

func (d *PersistentData) UpdateLevelCompletion(level *gamedata.LevelData, bonus bool)

type State

type State struct {
	UIResources *eui.Resources

	LevelTileset *tiled.Tileset

	LevelsByAct [][]*gamedata.LevelData

	Track gamedata.Track

	PlotScaler *gamedata.PlotScaler

	Input *input.Handler

	Persistent PersistentData

	EffectiveVolume float64
}

Jump to

Keyboard shortcuts

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