util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GREY              = color.RGBA{128, 128, 128, 255}
	DARK_GREY         = color.RGBA{64, 64, 64, 255}
	TRANSPARENT_BLACK = color.RGBA{0, 0, 0, 128}
	TRANSPARENT_WHITE = color.RGBA{128, 128, 128, 128}
	RED               = color.RGBA{146, 17, 17, 255}
)

Functions

func LoadImage

func LoadImage(filename string, filesystem fs.FS) (image.Image, string, error)

Types

type Scene

type Scene[T any] interface {
	ebiten.Game
	Load(T, *SceneManager[T])
	Unload() T
}

type SceneManager

type SceneManager[T any] struct {
	// contains filtered or unexported fields
}

func NewSceneManager

func NewSceneManager[T any](scene Scene[T], state T) *SceneManager[T]

func (*SceneManager[T]) Draw

func (s *SceneManager[T]) Draw(screen *ebiten.Image)

func (*SceneManager[T]) Layout

func (s *SceneManager[T]) Layout(w, h int) (int, int)

func (*SceneManager[T]) Load

func (s *SceneManager[T]) Load(scene Scene[T])

func (*SceneManager[T]) Update

func (s *SceneManager[T]) Update() error

Jump to

Keyboard shortcuts

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