Skip to content

Commit

Permalink
use 1-based level numbering in FiniteStatusBar, phetsims/vegas#75, #57
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 a48a0b6 commit 4f0723e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/game/view/PlayNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ define( function( require ) {
// modules
var Bounds2 = require( 'DOT/Bounds2' );
var ChallengeNode = require( 'REACTANTS_PRODUCTS_AND_LEFTOVERS/game/view/ChallengeNode' );
var DerivedProperty = require( 'AXON/DerivedProperty' );
var DevGameControls = require( 'REACTANTS_PRODUCTS_AND_LEFTOVERS/dev/DevGameControls' );
var FiniteStatusBar = require( 'VEGAS/FiniteStatusBar' );
var GamePhase = require( 'REACTANTS_PRODUCTS_AND_LEFTOVERS/game/model/GamePhase' );
Expand Down Expand Up @@ -42,7 +43,9 @@ define( function( require ) {
// status bar, across the top of the screen
var statusBar = new FiniteStatusBar( layoutBounds, visibleBoundsProperty, model.scoreProperty, {
scoreDisplayConstructor: ScoreDisplayLabeledNumber,
levelProperty: model.levelProperty,

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

0 comments on commit 4f0723e

Please sign in to comment.