Documentation ¶
Overview ¶
Package ebitenkit contains utilities specific to github.com/hajimehoshi/ebiten/v2 library
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { *sprite.Collection // contains filtered or unexported fields }
Collection is a wrapper around sprite.Collection, keeping track of ebiten images for the corresponding sprites.
func NewCollection ¶
func NewCollection(col *sprite.Collection, logFunc func(msg string)) (*Collection, error)
NewCollection creates new collection, initializing frame images.
func (*Collection) Draw ¶
func (c *Collection) Draw(dest *ebiten.Image, do *sprite.DrawOpts)
Draw draws the sprite frame on dest image with given offset, scale and rotation.
func (*Collection) FrameImage ¶
func (c *Collection) FrameImage(name string, frame int) (*ebiten.Image, float64, float64, float64, float64)
FrameImage returns frame image for the sprite name and frame number. May return nil if such sprite is not in collection or frame number is invalid. Also retuerns sprite origins.
Click to show internal directories.
Click to hide internal directories.