MCPcopy
hub / github.com/EngoEngine/engo / NewAnimationComponent

Function NewAnimationComponent

common/animation.go:31–37  ·  view source on GitHub ↗

NewAnimationComponent creates an AnimationComponent containing all given drawables. Animations will be played using the given rate.

(drawables []Drawable, rate float32)

Source from the content-addressed store, hash-verified

29// NewAnimationComponent creates an AnimationComponent containing all given
30// drawables. Animations will be played using the given rate.
31func NewAnimationComponent(drawables []Drawable, rate float32) AnimationComponent {
32 return AnimationComponent{
33 Animations: make(map[string]*Animation),
34 Drawables: drawables,
35 Rate: rate,
36 }
37}
38
39// SelectAnimationByName sets the current animation. The name must be
40// registered.

Callers 11

CreateHeroMethod · 0.92
SetupMethod · 0.92
CreateEntityMethod · 0.92
UpdateMethod · 0.85
SetupMethod · 0.85

Calls

no outgoing calls