Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Desc ¶
Desc holds information that is shared between all instances of the same sprite.
type FrameDesc ¶
type FrameDesc struct { Img *ebiten.Image // Points maps a name to a list of positions relative to the sprite's top left corner Points map[string][]geo.Vec // Rects maps a name to a list of rectangles relative to the sprite's top left corner Rects map[string][]geo.Rect Duration time.Duration }
FrameDesc describes a single frame of a sprite
type Sprite ¶
Sprite is an instance of a sprite described by Desc. This allows one to create many copies of the same sprite, each animating independently, but all of the common data is shared.
func (*Sprite) Draw ¶
func (s *Sprite) Draw(dst *ebiten.Image, opts *ebiten.DrawImageOptions)
Draw the current frame to dst with the given options.
func (*Sprite) Ended ¶
Ended returns true when the sprite is not looping and is done with the last frame.
func (*Sprite) Points ¶
Points returns the points associated with the given name for the current frame.
Click to show internal directories.
Click to hide internal directories.