Skip to content

Commit

Permalink
use 1-based level numbering in FiniteStatusBar, phetsims/vegas#75, #127
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <[email protected]>
  • Loading branch information
pixelzoom committed Jul 6, 2018
1 parent 2eb1cd7 commit 47cd3fe
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/game/view/GamePlayNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define( function( require ) {
var BCEConstants = require( 'BALANCING_CHEMICAL_EQUATIONS/common/BCEConstants' );
var BCEQueryParameters = require( 'BALANCING_CHEMICAL_EQUATIONS/common/BCEQueryParameters' );
var BoxesNode = require( 'BALANCING_CHEMICAL_EQUATIONS/common/view/BoxesNode' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var Dimension2 = require( 'DOT/Dimension2' );
var EquationNode = require( 'BALANCING_CHEMICAL_EQUATIONS/common/view/EquationNode' );
var FiniteStatusBar = require( 'VEGAS/FiniteStatusBar' );
Expand Down Expand Up @@ -56,7 +57,9 @@ define( function( require ) {
// status bar
var statusBar = new FiniteStatusBar( layoutBounds, visibleBoundsProperty, model.pointsProperty, {
scoreDisplayConstructor: ScoreDisplayLabeledNumber,
levelProperty: model.levelProperty,

// FiniteStatusBar uses 1-based level numbering, model is 0-based, see #127.
levelProperty: new DerivedProperty( [ model.levelProperty ], function( level ) { return level + 1; } ),
challengeIndexProperty: model.currentEquationIndexProperty,
numberOfChallengesProperty: model.numberOfEquationsProperty,
elapsedTimeProperty: model.timer.elapsedTimeProperty,
Expand Down

0 comments on commit 47cd3fe

Please sign in to comment.