resource

package
v0.0.0-...-1ebc2e8 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: LGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SpriteSheet

type SpriteSheet []SpriteSheetEntry

func NewSpriteSheet

func NewSpriteSheet(data []byte, strideX, strideY int) (SpriteSheet, error)

func NewSpriteSheetFromConfig

func NewSpriteSheetFromConfig(data []byte, configData []byte) (SpriteSheet, error)

func (SpriteSheet) ByName

func (s SpriteSheet) ByName(name string) *ebiten.Image

type SpriteSheetConfig

type SpriteSheetConfig struct {
	XMLName xml.Name                 `xml:"TextureAtlas"`
	Entries []SpriteSheetConfigEntry `xml:"SubTexture"`
}

type SpriteSheetConfigEntry

type SpriteSheetConfigEntry struct {
	PosX   int    `xml:"x,attr"`
	PosY   int    `xml:"y,attr"`
	Width  int    `xml:"width,attr"`
	Height int    `xml:"height,attr"`
	Name   string `xml:"name,attr"`
}

type SpriteSheetEntry

type SpriteSheetEntry struct {
	ImageRef *ebiten.Image
	Name     string
}

Jump to

Keyboard shortcuts

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