io

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUINotOnce = fmt.Errorf("there must be only 1 file in ./UI")

ErrUINotOnce is returned when there are more than 1 files in ./UI.

Functions

func LoadEnemyConfigs

func LoadEnemyConfigs() ([]config.Enemy, error)

LoadEnemyConfigs loads enemy configs from the Enemies directory.

func LoadLevelConfigs

func LoadLevelConfigs() ([]config.Level, error)

LoadLevelConfigs loads level configs from the Levels directory.

func LoadMapConfigs

func LoadMapConfigs() ([]config.Map, error)

LoadMapConfigs loads map configs from the Maps directory.

func LoadReplays

func LoadReplays() ([]*replay.Watcher, error)

LoadReplays loads replays from the Replays directory.

func LoadStats

func LoadStats() (*ingame.PlayerState, error)

func LoadTowerConfigs

func LoadTowerConfigs() ([]config.Tower, error)

LoadTowerConfigs loads tower configs from the Towers directory.

func LoadUIConfig

func LoadUIConfig() (config.UI, error)

LoadUIConfig loads UI configs from the UI directory.

func ReadConfigs

func ReadConfigs[T any](dirName, ext string) ([]T, error)

ReadConfigs reads all files with extension ext from dirName and returns a slice of T.

func SaveStats

func SaveStats(stats *ingame.PlayerState) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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