Closed samreid closed 4 years ago
@jbphet indicated this can be done by passing an object with a play()
method, and handling the condition there:
const p = {
play() {
}
};
const buttonOptions = {
centerY: sourceNode.centerY + buttonOffset,
left: buttonPosition,
radius: WaveInterferenceConstants.WAVE_GENERATOR_BUTTON_RADIUS,
content: pulseIcon,
touchAreaDilation: WaveInterferenceConstants.WAVE_GENERATOR_BUTTON_TOUCH_AREA_DILATION,
baseColor: WaveInterferenceConstants.WAVE_GENERATOR_BUTTON_COLOR,
soundPlayer: p
};
Implemented above and ready for review. @emily-phet can you please test on phettest, and close if all is well?
@samreid - all is well - closing.
From today's meeting: Don't play the "squishy button sound" if another sound would be generated, or if another sound is ending due to the button press