`state.removeListener` not as expected
xieyhn opened this issue · 2 comments
xieyhn commented
Example below, when I remove the callback when the first callback is called, then the second callback never gets called.
const animation = new Spine(/* ... */)
const listener = {
complete: () => {
animation.state.removeListener(listener)
},
}
animation.state.addListener(listener)
animation.state.addListener({
complete: () => {
// Never called
},
})
xieyhn commented
"pixi-spine": "^4.0.4"
xieyhn commented
Maybe the problem is in the for i loop that calls the callback