Skip to content

Commit

Permalink
Change initial speed on Intro screen, see #88
Browse files Browse the repository at this point in the history
  • Loading branch information
andrealin committed Aug 10, 2017
1 parent f819e20 commit 20c1722
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions js/common/model/ProjectileMotionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ define( function( require ) {
* @param {boolean} defaultAirResistance - default air resistance on value
* @param {number} defaultCannonHeight - optional, defaults to 0, only used by Intro screen
* @param {number} defaultCannonAngle - option, defaults to 80, only used by Intro screen
* @param {number} defaultInitialSpeed - option, defaults to 80, only used by Intro screen
* @constructor
*/
function ProjectileMotionModel( defaultProjectileObjectType, defaultAirResistance, defaultCannonHeight, defaultCannonAngle ) {
function ProjectileMotionModel( defaultProjectileObjectType, defaultAirResistance, defaultCannonHeight, defaultCannonAngle, defaultInitialSpeed ) {


// @public {ObservableArray.<Trajectory>} observable array of trajectories, limited to 5
Expand All @@ -60,7 +61,7 @@ define( function( require ) {
this.cannonAngleProperty = new NumberProperty( defaultCannonHeight ? defaultCannonAngle : 80 );

// @public {Property.<number>} launch speed, in meters per second
this.launchVelocityProperty = new NumberProperty( 18 );
this.launchVelocityProperty = new NumberProperty( defaultCannonHeight ? defaultInitialSpeed : 18 );

// --parameters for next projectile fired

Expand Down
2 changes: 1 addition & 1 deletion js/intro/model/IntroModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ define( function( require ) {
ProjectileObjectType.CAR
];

ProjectileMotionModel.call( this, this.objectTypes[ 0 ], false, 10, 0 );
ProjectileMotionModel.call( this, this.objectTypes[ 0 ], false, 10, 0, 15 );
}

projectileMotion.register( 'IntroModel', IntroModel );
Expand Down

0 comments on commit 20c1722

Please sign in to comment.