MCPcopy Index your code
hub / github.com/EngoEngine/engo / Cell

Method Cell

common/animation.go:73–81  ·  view source on GitHub ↗

Cell returns the drawable for the current frame.

()

Source from the content-addressed store, hash-verified

71
72// Cell returns the drawable for the current frame.
73func (ac *AnimationComponent) Cell() Drawable {
74 if len(ac.CurrentAnimation.Frames) == 0 {
75 log.Println("No frame data for this animation. Selecting zeroth drawable. If this is incorrect, add an action to the animation.")
76 return ac.Drawables[0]
77 }
78 idx := ac.CurrentAnimation.Frames[ac.index]
79 ac.CurrentFrame = idx
80 return ac.Drawables[idx]
81}
82
83// NextFrame advances the current animation by one frame.
84func (ac *AnimationComponent) NextFrame() {

Callers 2

UpdateMethod · 0.45

Calls

no outgoing calls

Tested by 1