Documentation ¶
Overview ¶
Package sprite adds some basic sprite support to the gfx package.
See README.md for more info.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(s *Sprite)
Option is the signature of a configuration function for a Sprite
type Sprite ¶
type Sprite struct {
X, Y float64
// contains filtered or unexported fields
}
Sprite represents a sprite
func New ¶
New creates a new sprite. If there are no animations the entire texture is used to render the sprite
func (*Sprite) PlayAnimation ¶
PlayAnimation selects the animation to play for the sprite
func (*Sprite) ResetAnimation ¶
func (s *Sprite) ResetAnimation()
ResetAnimation resets the animation to the first frame
func (*Sprite) StopAnimation ¶
func (s *Sprite) StopAnimation()
StopAnimation stops the sprites animation
Click to show internal directories.
Click to hide internal directories.