phetsims / build-a-nucleus

"Build a Nucleus" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 5 forks source link

Use clearIncomingParticle() in animationEndedEmitter #131

Closed Luisav1 closed 1 year ago

Luisav1 commented 1 year ago

From #112. If removal of listener's must not happen at the very end of the listener, can use clearIncomingParticle() to remove duplicated code. Current animationEndedEmitter: https://github.com/phetsims/build-a-nucleus/blob/253b5ece9b920e07cdcd023fd85799f7d4763ee7/js/common/view/BANScreenView.ts#L676-L681

clearIncomingParticle function: https://github.com/phetsims/build-a-nucleus/blob/253b5ece9b920e07cdcd023fd85799f7d4763ee7/js/common/view/BANScreenView.ts#L720-L723