Skip to content

Commit

Permalink
Add soccer ball value sounds, see: #144
Browse files Browse the repository at this point in the history
  • Loading branch information
marlitas committed Apr 1, 2024
1 parent fb918fd commit 4c42f30
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/balance-point/model/BalancePointSceneModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import NumberProperty from '../../../../axon/js/NumberProperty.js';
import DerivedProperty from '../../../../axon/js/DerivedProperty.js';
import Multilink from '../../../../axon/js/Multilink.js';
import Utils from '../../../../dot/js/Utils.js';
import NumberTone from '../../../../soccer-common/js/model/NumberTone.js';

type BalancePointSceneModelOptions = SoccerSceneModelOptions;

Expand Down Expand Up @@ -159,6 +160,12 @@ export default class BalancePointSceneModel extends SoccerSceneModel {
}
}
);

this.soccerBalls.forEach( soccerBall => {
soccerBall.toneEmitter.addListener( value => {
NumberTone.playValue( value );
} );
} );
}

private getKickedBalls(): SoccerBall[] {
Expand Down

0 comments on commit 4c42f30

Please sign in to comment.