res

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fonts

type Fonts struct {
	Default font.Face
}

Fonts resource for access to UI fonts.

func NewFonts

func NewFonts(fSys fs.FS, dir string) Fonts

type GameSpeed

type GameSpeed struct {
	// Is the game paused?
	Pause bool
	// Next tick to pause
	NextPause int64
	// Speed index in Speeds.
	SpeedIndex uint8
	// Available speeds in TPS.
	Speeds []uint16
}

GameSpeed resource.

type GameTick

type GameTick struct {
	// Current update tick. Stops when the game is paused.
	Tick int64
}

GameTick resource.

type Mouse

type Mouse struct {
	// whether the mouse is inside the game window.
	IsInside bool
}

Mouse resource.

type Screen

type Screen struct {
	// The screen image.
	Image *ebiten.Image
	// Current screen width.
	Width int
	// Current screen height.
	Height int
}

Screen resource for drawing.

type Sprites

type Sprites struct {
	Background        *image.NineSlice
	BackgroundHover   *image.NineSlice
	BackgroundPressed *image.NineSlice

	TextColor color.RGBA
}

Sprites holds all tileset data.

func NewSprites

func NewSprites(fSys fs.FS, dir string) Sprites

NewSprites creates a new Sprites resource from the given tileset folder.

Jump to

Keyboard shortcuts

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