Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sprite ¶
type Sprite struct { Name string Row int Col int Sheet *SpriteSheet }
Sprite represents a single sprite within a sprite sheet.
type SpriteSheet ¶
SpriteSheet represents a sprite sheet config file loaded from YAML.
func OpenAndRead ¶
func OpenAndRead(path string) (*SpriteSheet, error)
OpenAndRead reads and returns the sprite sheet config file at the given path.
func Read ¶
func Read(r io.Reader) (*SpriteSheet, error)
Read reads a sprite sheet config file, parses it, and returns it.
func (*SpriteSheet) Sprites ¶
func (ss *SpriteSheet) Sprites() map[string]*Sprite
Sprites returns a map of all the sprites declared in the sprite sheet. The map keys are the sprite names.
Click to show internal directories.
Click to hide internal directories.