Skip to content

Commit

Permalink
spec: can't destroy sprites declared on stages
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Oct 5, 2021
1 parent 6269395 commit f5f279b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sprite.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func applySpriteProps(dest *Sprite, v specsp) {
if idx, ok := v["currentCostumeIndex"]; ok {
dest.currentCostumeIndex = int(idx.(float64))
}
dest.isCloned = false
}

func applySprite(out reflect.Value, sprite Spriter, v specsp) (*Sprite, interface{}) {
Expand All @@ -187,7 +188,6 @@ func cloneSprite(out reflect.Value, outPtr interface{}, in reflect.Value, src *S
}()
if v != nil {
applySpriteProps(dest, v)
dest.isCloned = false
} else if ini, ok := outPtr.(initer); ok {
ini.Main()
}
Expand Down

0 comments on commit f5f279b

Please sign in to comment.