sprites

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sprite

type Sprite struct {
	Image   *image.Image `json:"-"`
	Name    string       `json:"name"`
	X       int          `json:"x"`
	Y       int          `json:"y"`
	Width   int          `json:"width,omitempty"`
	Height  int          `json:"height,omitempty"`
	Widths  [3]int       `json:"widths,omitempty"`
	Heights [3]int       `json:"heights,omitempty"`
	Count   int          `json:"count"`
	Grid    int          `json:"grid"`
	Gap     int          `json:"gap,omitempty"`
}

Sprite is the base struct for any sprite

type SpriteMap

type SpriteMap = map[string]*Sprite

SpriteMap is a map of sprites

func NewSpriteMap

func NewSpriteMap(imageData []byte, jsondata string) (SpriteMap, error)

NewSpriteMap creates a new sprite map

Jump to

Keyboard shortcuts

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