lib

package
v0.0.0-...-186440e Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AudioID

type AudioID int

type Context

type Context struct {
	Loader *Loader

	FullScreen   bool
	WindowTitle  string
	WindowWidth  float64
	WindowHeight float64
	ScreenWidth  float64
	ScreenHeight float64
}

func NewContext

func NewContext() *Context

type ImageID

type ImageID int

type Loader

type Loader struct {
	Audio     map[AudioID]*audio.Player
	Image     map[ImageID]*ebiten.Image
	OpenAsset func(string) io.ReadCloser
	// contains filtered or unexported fields
}

func NewLoader

func NewLoader(audioContext *audio.Context) *Loader

func (*Loader) LoadAllAudio

func (l *Loader) LoadAllAudio(resources map[AudioID]string, progress *float64)

func (*Loader) LoadAllImages

func (l *Loader) LoadAllImages(resources map[ImageID]string, progress *float64)

TODO: make a single function for images and audios

func (*Loader) LoadAudio

func (l *Loader) LoadAudio(id AudioID, path string) *audio.Player

func (*Loader) LoadImage

func (l *Loader) LoadImage(id ImageID, path string) *ebiten.Image

func (*Loader) LoadOGG

func (l *Loader) LoadOGG(id AudioID, path string) *audio.Player

func (*Loader) LoadWAV

func (l *Loader) LoadWAV(id AudioID, path string) *audio.Player

type Once

type Once struct {
	// contains filtered or unexported fields
}

func NewOnce

func NewOnce() *Once

func (*Once) Invoke

func (o *Once) Invoke() bool

func (*Once) Reset

func (o *Once) Reset()

Jump to

Keyboard shortcuts

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