assets

package
v0.0.0-...-1151b5d Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assets

type Assets struct {
	SpriteSheet       *ebiten.Image
	SpriteSheetXMLMap SpriteMap
}

func NewAssets

func NewAssets() *Assets

func (*Assets) GetRandomTankBarrell

func (a *Assets) GetRandomTankBarrell() *ebiten.Image

func (*Assets) GetRandomTankBody

func (a *Assets) GetRandomTankBody() *ebiten.Image

func (*Assets) GetSprite

func (a *Assets) GetSprite(name string) *ebiten.Image

type SpriteMap

type SpriteMap struct {
	XMLName     xml.Name     `xml:"TextureAtlas"`
	ImagePath   string       `xml:"imagePath,attr"`
	SubTextures []SubTexture `xml:"SubTexture"`
}

type 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"`
}

Jump to

Keyboard shortcuts

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