Discover Packages
github.com/runozo/go-wave-function-collapse
assets
package
Version:
v0.6.8
Opens a new window with list of versions in this module.
Published: Nov 4, 2024
License: GPL-3.0
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Assets struct {
SpriteSheet *ebiten.Image
SpriteSheetXMLMap SpriteMap
}
GetSprite retrieves the sprite image by name from the assets.
Parameters:
- name: the name of the sprite to retrieve.
Returns:
- *ebiten.Image: the sprite image corresponding to the given name.
type SpriteMap struct {
XMLName xml .Name `xml:"TextureAtlas"`
ImagePath string `xml:"imagePath,attr"`
SubTextures []SubTexture `xml:"SubTexture"`
}
type SubTexture struct {
XMLName xml .Name `xml:"SubTexture"`
Name string `xml:"name,attr"`
X int `xml:"x,attr"`
Y int `xml:"y,attr"`
Width int `xml:"width,attr"`
Height int `xml:"height,attr"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.