From 20c1722e4bf5284ffd5fd8975ae094fc57328546 Mon Sep 17 00:00:00 2001 From: Andrea Lin Date: Thu, 10 Aug 2017 10:03:35 -0600 Subject: [PATCH] Change initial speed on Intro screen, see #88 --- js/common/model/ProjectileMotionModel.js | 5 +++-- js/intro/model/IntroModel.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/common/model/ProjectileMotionModel.js b/js/common/model/ProjectileMotionModel.js index a4acca76..44b53742 100644 --- a/js/common/model/ProjectileMotionModel.js +++ b/js/common/model/ProjectileMotionModel.js @@ -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.} observable array of trajectories, limited to 5 @@ -60,7 +61,7 @@ define( function( require ) { this.cannonAngleProperty = new NumberProperty( defaultCannonHeight ? defaultCannonAngle : 80 ); // @public {Property.} launch speed, in meters per second - this.launchVelocityProperty = new NumberProperty( 18 ); + this.launchVelocityProperty = new NumberProperty( defaultCannonHeight ? defaultInitialSpeed : 18 ); // --parameters for next projectile fired diff --git a/js/intro/model/IntroModel.js b/js/intro/model/IntroModel.js index 7de46dcc..feed04e2 100644 --- a/js/intro/model/IntroModel.js +++ b/js/intro/model/IntroModel.js @@ -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 );