Skip to content

Commit

Permalink
make the "Awake" method private
Browse files Browse the repository at this point in the history
  • Loading branch information
JiepengTan committed Jun 21, 2024
1 parent 7f07850 commit 5e4b01d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion game.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func (p *Game) loadIndex(g reflect.Value, proj *projConfig) (err error) {
spr := spriteOf(ini)
if spr != nil {
spr.OnStart(func() {
spr.Awake()
spr.awake()
})
}
ini.Main()
Expand Down
4 changes: 2 additions & 2 deletions sprite.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (p *Sprite) init(
p.animations[key] = ani
}
}
func (p *Sprite) Awake() {
func (p *Sprite) awake() {
if p.defaultAnimation != "" {
if p.isVisible {
p.Animate(p.defaultAnimation)
Expand Down Expand Up @@ -256,7 +256,7 @@ func cloneSprite(out reflect.Value, outPtr Spriter, in reflect.Value, v specsp)
applySpriteProps(dest, v)
} else { // in sprite.Clone
dest.OnCloned__1(func() {
dest.Awake()
dest.awake()
})
outPtr.Main()
}
Expand Down

0 comments on commit 5e4b01d

Please sign in to comment.