This commit is contained in:
Josh Deprez 2021-08-01 14:41:39 +10:00 committed by Josh Deprez
parent 8e5c82db29
commit facb9f8e91

View file

@ -14,7 +14,7 @@ var (
// AnimDefs are easier to write as Go expressions - // AnimDefs are easier to write as Go expressions -
// so just set this. // so just set this.
AnimDefCache map[string]*AnimDef AnimDefs map[string]*AnimDef
imageCache = make(map[string]*ebiten.Image) imageCache = make(map[string]*ebiten.Image)
) )
@ -30,7 +30,7 @@ func (r *AnimRef) Anim() *Anim {
if r.anim != nil { if r.anim != nil {
return r.anim return r.anim
} }
if ad := AnimDefCache[r.Key]; ad != nil { if ad := AnimDefs[r.Key]; ad != nil {
r.anim = &Anim{Def: ad} r.anim = &Anim{Def: ad}
return r.anim return r.anim
} }