Documentation ¶
Index ¶
Constants ¶
View Source
const SchemaStr = `` /* 453-byte string literal not displayed */
View Source
const TypeName = "animations"
Variables ¶
This section is empty.
Functions ¶
func LoadSchema ¶
func LoadSchema() (*gojsonschema.Schema, error)
func SortFramesTopBottomLeftRight ¶
func SortFramesTopBottomLeftRight(frameImages Images)
Types ¶
type Animatable ¶
Animatable is the component used in the animation system.
type Animations ¶
type Animations struct { SpriteSetRef string FrameDuration time.Duration TaggedImages map[string]Images Controller *Controller }
Animations organizes tagged frames from an image set into animations.
func NewAnimations ¶
func NewAnimations( spriteSetRef string, frameDur time.Duration) *Animations
func (*Animations) Initialize ¶
func (anims *Animations) Initialize(mgr resource.Manager) error
func (*Animations) MarshalJSON ¶
func (anims *Animations) MarshalJSON() ([]byte, error)
func (*Animations) Start ¶
func (anims *Animations) Start(tag string) bool
func (*Animations) UnmarshalJSON ¶
func (anims *Animations) UnmarshalJSON(d []byte) error
type AnimationsJSON ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController() *Controller
func (*Controller) CurrentFrameImage ¶
func (c *Controller) CurrentFrameImage() *ebiten.Image
func (*Controller) CurrentFrameIndex ¶
func (c *Controller) CurrentFrameIndex() int
func (*Controller) CurrentFrameTag ¶
func (c *Controller) CurrentFrameTag() string
func (*Controller) StartAnimation ¶
func (*Controller) Update ¶
func (c *Controller) Update(delta time.Duration)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_animation is a generated GoMock package.
|
Package mock_animation is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.