Skip to content

Commit

Permalink
Reset timer and pause when changing scenes, see #231
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Dec 12, 2018
1 parent cadaa0c commit 69f0273
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/waves/model/WavesScreenModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,11 @@ define( require => {
// @public - Notifies listeners when the model reset is complete
this.resetEmitter = new Emitter();

// Reset the stopwatch time when changing scenes.
this.sceneProperty.link( () => this.timerElapsedTimeProperty.reset() );
// Reset the stopwatch time when changing scenes, and pause it.
this.sceneProperty.link( () => {
this.isTimerRunningProperty.reset();
this.timerElapsedTimeProperty.reset();
} );
}

/**
Expand Down

0 comments on commit 69f0273

Please sign in to comment.