add Anim method
This commit is contained in:
parent
3cb6f496ea
commit
4a39c55f2a
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ func (s *Sprite) Scan(visit VisitFunc) error {
|
|||
return visit(&s.Sheet)
|
||||
}
|
||||
|
||||
// Anim returns the current Anim.
|
||||
func (s *Sprite) Anim() *Anim { return s.anim }
|
||||
|
||||
// SetAnim sets the Anim to use for the sprite. If it is not the same as the
|
||||
// one currently set, it resets the new anim.
|
||||
func (s *Sprite) SetAnim(a *Anim) {
|
||||
|
|
Loading…
Reference in a new issue