Box2D-日曜大工の自動運動の物理学

Habrのすべての読者への挨拶。 このトピックでは、前輪駆動車と全輪駆動車の動きの単純な物理学を簡単に作成できることを示します。 さあ、行こう!

エントリー


私は物理学のすべての概念にまだ精通していないとすぐに言わなければなりませんが、私はそれらが何であるかを理解しているので、賢い言葉を期待しないでください、私は事前にすみません、最も理解しやすい人間の言語ですべてを説明しようとします
この記事を書くきっかけは、機能するアナログが不足していることです。 これを行う必要がある瞬間、私は1つだけ多かれ少なかれ通常の例をグーグルで検索しました。
  1. ドリフト/スリップの合計不足
  2. X軸とY軸に沿って移動するときの速度が異なります(原因は不明ですが、これは必要ありません)


準備する


それで、私たちは何を知っていますか。 しかし、私たちは車で(そして私たちの場合は車輪で)運転するとき、いくつかの力が働くことを知っています。 単純なプロジェクトの場合、当然、これらの力のいくつかは無視することができます(本格的なシミュレーターを実行していません)。
使用するすべてのパラメーター:
  1. 牽引力(ここでは速度と加速度になります)
  2. ホイールの縦摩擦
  3. ホイール摩擦

これらすべての力は、車輪のオブジェクトに直接適用されます。
グラフィカルに前進する場合、これらの力は次のように表すことができます(写真の車の前部を上にしてください)。
画像
X軸-ホイールの横摩擦
Y軸ダウン-ホイールの縦摩擦
Y軸アップ-速度と加速度
上記のすべての軸は、常に各ホイールの中心とその回転角度に対して相対的です。

コードを書く


物理エンジンとして、Box2Dを選択しました。 コードを記述しやすくするために、Box2Dでプリミティブを作成するのがはるかに簡単になるため、 QuickBox2Dラッパーを使用することにしました。

必要なクラスを接続します
  1. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  2. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  3. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  4. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  5. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  6. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;
  7. import Box2D. Collision . Shapes . * ; import Box2D. Common . Math . * ; import Box2D. Dynamics . * ; import Box2D. Dynamics . Joints . * ; import Box2D. Collision . * ; import Box2D. Common . * ; import com. actionsnippet . qbox . * ;

...そして私たちの世界を作ります:
  1. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  2. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  3. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  4. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //
  5. var world:QuickBox2D = new QuickBox2D ( this , { debug: false , frim: true } ) ; world. gravity = new b2Vec2 ( 0 , 0 ) ; // world. start ( ) ; // world. createStageWalls ( ) ; // QuickBox'a - 4 stage world. mouseDrag ( ) ; //


必要な変数または定数を書きます
  1. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  2. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  3. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  4. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  5. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  6. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  7. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  8. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  9. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  10. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  11. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  12. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  13. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  14. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  15. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  16. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  17. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  18. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  19. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  20. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  21. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  22. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  23. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  24. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  25. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  26. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  27. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  28. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  29. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  30. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  31. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  32. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -
  33. // : private const FWD= 1 ; // private const AWD= 2 ; // private const RWD= 3 ; // private var _privod: Number ; // , private var _maxTurnAngle: Number ; // private var _width : Number ; // private var _height : Number ; // private var _axisOffset: Number ; // , private const _angularDamping = 7 ; // private const _angularDampingReverse = 3 ; // , private const _linearDamping = 0.25 ; // , - private const _linearDampingReverse = 0.5 ; // public var _carBody:QuickObject; // private var _frontAxisBodyLeft:QuickObject; // private var _frontAxisBodyRight:QuickObject; private var _rearAxisBodyLeft:QuickObject; private var _rearAxisBodyRight:QuickObject; private var _frontLeftJoint:QuickObject; // private var _frontRightJoint:QuickObject; private var _rearLeftJoint:QuickObject; // private var _rearRightJoint:QuickObject; protected var axisHeight: Number = 4 ; // protected var axisWidth: Number = 7 ; // public var drive: int = 0 ; // public var steer: int = 0 ; //drive = 1 - //drive = 0 - , //drive = -1 - // //steer = -1 - //steer = 0 - //steer = 1 -


車輪付きの車を作成します
  1. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  2. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  3. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  4. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  5. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  6. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  7. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  8. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  9. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  10. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  11. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  12. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  13. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  14. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  15. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  16. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  17. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  18. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  19. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  20. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  21. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  22. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  23. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  24. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  25. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  26. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  27. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  28. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  29. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  30. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  31. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  32. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  33. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  34. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  35. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  36. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  37. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  38. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  39. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  40. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  41. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  42. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  43. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  44. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  45. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  46. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  47. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  48. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  49. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  50. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  51. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  52. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  53. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  54. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  55. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  56. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  57. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  58. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  59. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  60. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  61. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  62. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  63. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  64. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  65. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  66. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  67. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  68. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  69. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  70. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  71. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  72. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  73. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  74. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  75. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  76. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  77. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  78. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  79. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  80. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  81. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  82. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  83. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  84. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  85. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  86. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  87. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  88. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  89. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  90. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  91. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  92. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  93. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  94. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  95. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  96. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  97. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  98. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  99. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  100. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  101. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  102. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  103. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  104. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  105. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  106. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  107. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  108. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  109. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  110. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  111. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  112. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  113. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  114. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  115. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  116. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  117. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  118. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  119. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  120. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;
  121. // _width = 76 ; _height = 40 ; _maxTurnAngle = 15 * Globals. DEG_TO_RAD ; // _axisOffset: Number = ( _width / 4 - axisWidth ) / Globals. RATIO // _privod = FWD; // , _carBody = world. addBox ( { width : this . _width / 2 / Globals. RATIO , height : this . _height / 2 / Globals. RATIO , x : ( this . x + this . _width / 2 ) / Globals. RATIO , y : ( this . y + this . _height / 2 ) / Globals. RATIO , density: 0.48 , driction: 0.3 , restitution: 0.4 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true , skin: null , scaleSkin: true } ) ; this ._frontAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. body . GetWorldCenter ( ) . x + this ._axisOffset, y :_carBody. body . GetWorldCenter ( ) . y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 } ) ; this ._frontLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyLeft. body , x1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyLeft. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._frontRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._frontAxisBodyRight. body , x1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y1: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , x2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . x , y2: this ._frontAxisBodyRight. body . GetWorldCenter ( ) . y , enableLimit: true , enableMotor: true , collideConnected: true , lowerAngle:- this ._maxTurnAngle, upperAngle: this ._maxTurnAngle } ) ; this ._rearAxisBodyLeft = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y - this . _height / 4 / Globals. RATIO + 1 / Globals. RATIO , // + (this.axisHeight/2) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearAxisBodyRight = this . world . addBox ( { width : this . axisWidth / Globals. RATIO , height : ( this . axisHeight ) / Globals. RATIO , x :_carBody. x - this ._axisOffset, //-this.frontPivotOffset, y :_carBody. y + this . _height / 4 / Globals. RATIO - 1 / Globals. RATIO , // - (this.axisHeight) / Globals.RATIO, density: 0.48 , friction: 0.3 , restitution: 0.5 , linearDamping: this ._linearDamping, angularDamping: this ._angularDamping, groupIndex:- 1 , isSleeping: true } ) ; this ._rearLeftJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyLeft. body , x1: this ._rearAxisBodyLeft. x , y1: this ._rearAxisBodyLeft. y , x2: this ._rearAxisBodyLeft. x , y2: this ._rearAxisBodyLeft. y , enableLimit: true , enableMotor: false , collideConnected: false , lowerAngle: 0 , upperAngle: 0 } ) ; this ._rearRightJoint = this . world . addJoint ( { type :QuickBox2D. REVOLUTE , a: this ._carBody. body , b: this ._rearAxisBodyRight. body , x1: this ._rearAxisBodyRight. x , y1: this ._rearAxisBodyRight. y , x2: this ._rearAxisBodyRight. x , y2: this ._rearAxisBodyRight. y , enableLimit: true , enableMotor: false , lowerAngle: 0 , upperAngle: 0 } ) ;


さて、私たちは車を作りました。 その外観は上の図とほぼ同じですが、時計回りに90%回転するだけです。
今、私たちには主な仕事があります:私たちの車に運転を教えることです。 駆動効果を達成するために、 ApplyForce(..)を必要なホイールに適用します前輪駆動-前輪。全輪駆動-全輪)
車の物理を計算して制御するには、世界が更新されるたびに、 accelerate()を使用して呼び出します。
  1. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  2. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  3. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  4. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  5. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  6. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  7. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  8. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  9. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  10. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  11. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  12. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  13. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  14. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  15. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  16. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  17. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  18. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  19. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  20. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  21. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  22. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  23. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  24. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  25. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  26. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  27. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  28. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  29. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  30. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  31. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  32. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  33. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  34. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  35. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  36. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  37. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  38. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  39. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  40. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  41. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  42. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  43. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  44. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  45. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  46. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  47. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;
  48. stage . addEventListener ( KeyboardEvent. KEY_DOWN , keyDownList ) ; stage . addEventListener ( KeyboardEvent. KEY_UP , keyUpList ) ; world. addEventListener ( QuickBox2D. STEP ,onStep ) ; ... var bup: Boolean ; var bdown: Boolean ; var bleft: Boolean ; var bright: Boolean ; function keyDownList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = true ; } if ( e . keyCode == Keyboard. LEFT ) { bleft = true ; } if ( e . keyCode == Keyboard. DOWN ) { bdown = true ; } if ( e . keyCode == Keyboard. RIGHT ) { bright = true ; } } ; function keyUpList ( e :KeyboardEvent ) : void { if ( e . keyCode == Keyboard. UP ) { bup = false ; } ; if ( e . keyCode == Keyboard. LEFT ) { bleft = false ; } ; if ( e . keyCode == Keyboard. DOWN ) { bdown = false ; } ; if ( e . keyCode == Keyboard. RIGHT ) { bright = false ; } ; } ; function onStep ( evt:Event ) : void { car. accelerate ( ) ; if ( bup ) { car. drive = 1 } ; if ( bdown ) { car. drive =- 1 } ; if ( ! bup && ! bdown ) ( car. drive = 0 ) ; if ( bleft ) { car. steer =- 1 } ; if ( bright ) { car. steer = 1 } ; if ( ! bleft && ! bright ) { car. steer = 0 } ; } ;


実際、 accelerate()プロシージャ自体(行ごとに解析します。完全なプロシージャコードは後ほど説明します):
1)最初に私たちは体を起こす
  1. this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
  2. this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;
  3. this ._carBody. body . WakeUp ( ) ; this ._frontAxisBodyLeft. body . WakeUp ( ) ; this ._frontAxisBodyRight. body . WakeUp ( ) ;


2)次に、必要な摩擦力(合計、X、およびY)を追加して、急旋回中に車が前進し、スリップしないようにします。慣性で移動する場合は減速します。
  1. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  2. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  3. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  4. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  5. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  6. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  7. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  8. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  9. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  10. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  11. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  12. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  13. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;
  14. if ( this . drive > 0 ) { // this ._acceleration = this ._accelerationForward; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } else { // this ._acceleration = this ._accelerationBackwards; this . setLinearDamping ( this ._linearDamping ) ; this . setAngularDamping ( this ._angularDamping ) ; } this . addFriction ( this ._rearAxisBodyLeft. body , 0 ) ; this . addFriction ( this ._rearAxisBodyRight. body , 0 ) ; this . addFriction ( this ._frontAxisBodyLeft. body , 1 ) ; this . addFriction ( this ._frontAxisBodyRight. body , 1 ) ;


3) setLinearDamping()およびsetAngularDamping()
  1. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  2. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  3. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  4. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  5. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  6. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  7. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  8. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  9. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  10. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  11. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  12. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  13. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  14. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  15. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  16. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  17. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }
  18. private function setLinearDamping ( linDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_linearDamping = linDamp; this ._frontAxisBodyRight. body . m_linearDamping = linDamp; this ._rearAxisBodyLeft. body . m_linearDamping = linDamp; this ._rearAxisBodyRight. body . m_linearDamping = linDamp; this ._carBody. body . m_linearDamping = linDamp; return ; } private function setAngularDamping ( angDamp: Number ) : void { this ._frontAxisBodyLeft. body . m_angularDamping = angDamp; this ._frontAxisBodyRight. body . m_angularDamping = angDamp; this ._rearAxisBodyLeft. body . m_angularDamping = angDamp; this ._rearAxisBodyRight. body . m_angularDamping = angDamp; this ._carBody. body . m_angularDamping = angDamp; return ; }


4)さて、私の意見では、最も興味深いaddFriction()手続きで、その実装を探しましたが、長い間見つけられなかったので、今では自分で実装しました。
  1. 関数 addFriction targetBody:b2Body、isFront: Number
  2. {
  3. var spd、spd2:b2Vec2;
  4. spd = targetBody。 GetLinearVelocity ;
  5. spd2 = targetBody。 GetLocalVector spd ;
  6. if this ._privod == FWD { //前輪駆動
  7. if isFront == 1 {
  8. spd2。 y = spd2 y * 0.5 ;
  9. }
  10. その他 {
  11. spd2。 y = spd2 y > 2.5 ? spd2。 y * 0.450 ;
  12. }
  13. spd = targetBody。 GetWorldVector spd2 ;
  14. targetBody。 SetLinearVelocity spd ;
  15. }
  16. if this ._privod == RWD {
  17. if isFront == 1 {
  18. spd2。 y = 0 ;
  19. spd2。 x = spd2。 x * .9;
  20. spd = targetBody。 GetWorldVector spd2 ;
  21. targetBody。 SetLinearVelocity spd ;
  22. }
  23. その他 {
  24. spd2。 y = spd2 y > 2.5 ? spd2。 y * 0.250 ;
  25. spd = targetBody。 GetWorldVector spd2 ;
  26. targetBody。 SetLinearVelocity spd ;
  27. }
  28. }
  29. }

この手順は、各ホイールのグローバル速度ベクトルspdをローカルspd2に分解し、XとYに沿って摩擦を適用します。頭に合わない唯一のことは、軸が時計回りに90%回転する理由だけです。 つまり、車を滑りから離し、上でスケッチしたX軸に沿って摩擦を追加するには、Y軸に摩擦を追加する必要があります(ホイールの横摩擦でもあります)。

5) 加速()を補完し続け、速度と加速の力を適用する角度を計算します(前輪の場合):
  1. var carAngle: 数値 = this ._carBody。 体の GetAngle ;
  2. if this。steer = 0 { //前進するとき
  3. this ._steerAngle = this ._steerAngle + thissteer * this ._steeringAcceleration;
  4. }
  5. if this ._steerAngle > carAngle + this ._steeringRange {
  6. this ._steerAngle = carAngle + this ._steeringRange;
  7. }
  8. else if this ._steerAngle < carAngle- this ._steeringRange {
  9. this ._steerAngle = carAngle- this ._steeringRange;
  10. }
  11. if this。drive < 0 { //後退するとき
  12. if this。steer == 0 {
  13. this ._steerAngle = carAngle;
  14. }
  15. else if this。steer ==- 1 {
  16. this ._steerAngle = carAngle- this ._steeringRange;
  17. }
  18. else if this。steer == 1 {
  19. this ._steerAngle = carAngle + this ._steeringRange;
  20. }
  21. }
  22. if this。steer == 0 {
  23. this ._steerAngle = carAngle;
  24. }


6)前輪を回します:
  1. この ._frontAxisBodyLeft。 体の SetXForm _frontAxisBodyLeft。Body。GetXForm Positionthis ._steerAngle ;
  2. この ._frontAxisBodyRight。 体の SetXForm _frontAxisBodyRight。Body。GetXForm Positionthis ._steerAngle ;


7)さて、ドライブに応じて、必要な車輪に必要な力を加えます:
  1. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  2. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  3. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  4. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  5. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  6. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  7. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  8. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  9. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  10. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  11. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  12. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  13. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  14. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  15. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  16. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  17. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  18. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  19. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  20. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  21. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  22. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  23. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  24. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  25. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  26. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  27. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  28. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  29. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  30. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  31. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  32. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  33. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  34. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  35. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  36. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  37. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  38. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  39. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  40. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  41. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  42. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  43. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  44. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  45. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  46. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  47. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  48. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  49. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  50. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  51. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }
  52. var carspeedX, carspeedY, carRearX,carRearY: Number ; if ( this ._privod == FWD ) { // carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; } if ( this ._privod == AWD ) { carspeedX = this . drive * Math . cos ( this ._steerAngle ) * ( this ._acceleration ) ; carspeedY = this . drive * Math . sin ( this ._steerAngle ) * ( this ._acceleration ) ; carRearX = this . drive * Math . cos ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; carRearY = this . drive * Math . sin ( this ._rearAxisBodyRight. angle ) * ( this ._acceleration ) ; } if ( this . drive ! = 0 ) { if ( this ._privod == FWD ) { // , ( ) this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) // , ( ) { this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carRearX, carRearY ) ) ; } } else { // spd = this . speed ; if ( spd > this ._friction ) { spd = spd - this ._friction / 1.3 ; } else { spd = 0 ; } if ( this ._privod == FWD ) // , ( ) { carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } if ( this ._privod == AWD ) { // , ( ) carspeedX = Math . cos ( this ._steerAngle ) * spd; carspeedY = Math . sin ( this ._steerAngle ) * spd; this ._frontAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._frontAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; carspeedX = Math . cos ( this ._carBody. angle ) * spd; carspeedY = Math . sin ( this ._carBody. angle ) * spd; this ._rearAxisBodyLeft. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; this ._rearAxisBodyRight. body . SetLinearVelocity ( new b2Vec2 ( carspeedX, carspeedY ) ) ; } }


8)最後の仕上げ:
  1. public function get speed 数値 {
  2. この ._carBodyを返します。 体の GetLinearVelocity 長さ ;
  3. }


合計


その結果、次のような結果が得られます。
narod.ruのデモSWF
megaswf.comのデモ(できればフルスクリーン)

ps何らかの理由で、コード全体を後ほど投稿します。

Source: https://habr.com/ru/post/J124704/


All Articles