NewAnimationComponent creates an AnimationComponent containing all given drawables. Animations will be played using the given rate.
(drawables []Drawable, rate float32)
| 29 | // NewAnimationComponent creates an AnimationComponent containing all given |
| 30 | // drawables. Animations will be played using the given rate. |
| 31 | func 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. |
no outgoing calls