diff --git a/js/gravity-force-lab-basics-main.js b/js/gravity-force-lab-basics-main.js index c5d9a79..a987afd 100644 --- a/js/gravity-force-lab-basics-main.js +++ b/js/gravity-force-lab-basics-main.js @@ -40,7 +40,8 @@ define( require => { thanks: '' }, keyboardHelpNode: keyboardHelpContent, - accessibility: true + accessibility: true, + supportsSound: true }; SimLauncher.launch( () => { diff --git a/js/gravity-force-lab-basics/model/GFLBModel.js b/js/gravity-force-lab-basics/model/GFLBModel.js index 6440036..c44bc93 100644 --- a/js/gravity-force-lab-basics/model/GFLBModel.js +++ b/js/gravity-force-lab-basics/model/GFLBModel.js @@ -81,6 +81,11 @@ define( require => { tandem: tandem.createTandem( 'distanceProperty' ) } ); + + // @public (read-only) - true when a reset is in progress + this.resetInProgressProperty = new BooleanProperty( false, { + tandem: tandem.createTandem( 'resetInProgressProperty' ) + } ); } /** @@ -88,9 +93,11 @@ define( require => { * @public */ reset() { + this.resetInProgressProperty.set( true ); this.constantRadiusProperty.reset(); this.showDistanceProperty.reset(); super.reset(); + this.resetInProgressProperty.set( false ); } } diff --git a/js/gravity-force-lab-basics/view/GFLBScreenView.js b/js/gravity-force-lab-basics/view/GFLBScreenView.js index fced0e1..1b92a99 100644 --- a/js/gravity-force-lab-basics/view/GFLBScreenView.js +++ b/js/gravity-force-lab-basics/view/GFLBScreenView.js @@ -40,7 +40,9 @@ define( require => { const PlayAreaNode = require( 'SCENERY_PHET/accessibility/nodes/PlayAreaNode' ); const Property = require( 'AXON/Property' ); const ResetAllButton = require( 'SCENERY_PHET/buttons/ResetAllButton' ); + const ResetAllSoundGenerator = require( 'TAMBO/sound-generators/ResetAllSoundGenerator' ); const ScreenView = require( 'JOIST/ScreenView' ); + const soundManager = require( 'TAMBO/soundManager' ); const SpherePositionsPDOMNode = require( 'GRAVITY_FORCE_LAB/gravity-force-lab/view/SpherePositionsPDOMNode' ); const Vector2 = require( 'DOT/Vector2' ); @@ -259,6 +261,10 @@ define( require => { tandem: tandem.createTandem( 'resetAllButton' ) } ); + soundManager.addSoundGenerator( new ResetAllSoundGenerator( model.resetInProgressProperty, { + initialOutputLevel: 0.7 + } ) ); + // children playAreaNode.children = [ objectOneMassPDOMNode,