animation

package
v1.5.54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	Frames            int           // Number of frames of anim.
	Symmetric         bool          // If true, repeat reversed frames 1..(Frames-2) at end of sequence.
	FrameInterval     int           // Time till next frame.
	NextInterval      int           // Time till NextAnim.
	WaitFinish        bool          // Set if this anim shouldn't be interrupted.
	NextAnim          string        // Name of next animation.
	SyncToMusicOffset time.Duration // Time in music to sync to frame 0.

	// These will be filled in by Init.
	Images    []*ebiten.Image // One image per frame.
	NextGroup *Group          // Pointer to same.
}

type State

type State struct {
	// Global state.
	Groups map[string]*Group

	// Current status.
	Group     *Group
	Frame     int
	WantNext  bool
	NextGroup *Group
}

func (*State) ForceGroup

func (s *State) ForceGroup(group string)

func (*State) Init

func (s *State) Init(spritePrefix string, groups map[string]*Group, initialGroup string) error

func (*State) SetGroup

func (s *State) SetGroup(group string)

func (*State) Update

func (s *State) Update(e *engine.Entity)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL